Re: pkg_add and umask
On Wed, Sep 21, 2016 at 10:44:37AM BST, Stuart Henderson wrote: > Related to the forwarded mail below, the mandoc.db files are also > affected by umask. > > Would it make sense for pkg_add and pkg_delete to just force a sane > umask before starting operations? Please do - it would be very nice indeed. This bit me in the arse a while back. Cheers, Raf > - Forwarded message from Marc Espie - > > From: Marc Espie > Date: Tue, 10 Mar 2015 13:13:53 +0100 > To: Alessandro DE LAURENZIS , ports > User-Agent: Mutt/1.5.22 (2013-10-16) > Subject: Re: pkg_add and umask [was misc@: Re: Cannot connect to CUPS web > interface in -current] > Mail-Followup-To: Alessandro DE LAURENZIS , ports > > > On Tue, Mar 10, 2015 at 10:54:34AM +, Stuart Henderson wrote: > > Moving to ports@ ... > > > > On 2015/03/10 11:32, Alessandro DE LAURENZIS wrote: > > > Hello Stuart, > > > > > > On Tue 10/03/2015 08:28, Stuart Henderson wrote: > > > > Is this while building the port, or just installing from packages? > > > > > > Installing from packages. Isn't that expected? > > > > Not sure. > > > > So: > > > > 1. Database files in /var/db/pkg are affected by umask ("pkg_add moo" with > > umask > > 077, then you can't "pkg_info moo" as a normal user) > > > > 2. Normal installed files from the package are not affected by umask > > > > 3. @sample'd files with an explicit @mode are not affected by umask > > > > 4. @sample'd files *without* an explicit mode (e.g. normal files installed > > in > > /etc) are affected by umask > > > > ... > > > > 1 could be argued either way, but I think current behaviour is ok. > > > > 2 and 3 seem correct to me > > > > 4 is surprising to me. Marc, is that intentional? > > I kindof think 4 should be forbidden or default'd to something sane, indeed. > > > - End forwarded message - >
pkg_add and umask
Related to the forwarded mail below, the mandoc.db files are also affected by umask. Would it make sense for pkg_add and pkg_delete to just force a sane umask before starting operations? - Forwarded message from Marc Espie - From: Marc Espie Date: Tue, 10 Mar 2015 13:13:53 +0100 To: Alessandro DE LAURENZIS , ports User-Agent: Mutt/1.5.22 (2013-10-16) Subject: Re: pkg_add and umask [was misc@: Re: Cannot connect to CUPS web interface in -current] Mail-Followup-To: Alessandro DE LAURENZIS , ports On Tue, Mar 10, 2015 at 10:54:34AM +, Stuart Henderson wrote: > Moving to ports@ ... > > On 2015/03/10 11:32, Alessandro DE LAURENZIS wrote: > > Hello Stuart, > > > > On Tue 10/03/2015 08:28, Stuart Henderson wrote: > > > Is this while building the port, or just installing from packages? > > > > Installing from packages. Isn't that expected? > > Not sure. > > So: > > 1. Database files in /var/db/pkg are affected by umask ("pkg_add moo" with > umask > 077, then you can't "pkg_info moo" as a normal user) > > 2. Normal installed files from the package are not affected by umask > > 3. @sample'd files with an explicit @mode are not affected by umask > > 4. @sample'd files *without* an explicit mode (e.g. normal files installed in > /etc) are affected by umask > > ... > > 1 could be argued either way, but I think current behaviour is ok. > > 2 and 3 seem correct to me > > 4 is surprising to me. Marc, is that intentional? I kindof think 4 should be forbidden or default'd to something sane, indeed. - End forwarded message -
Re: pkg_add and umask [was misc@: Re: Cannot connect to CUPS web interface in -current]
On Tue, Mar 10, 2015 at 12:13:53PM GMT, Marc Espie wrote: > On Tue, Mar 10, 2015 at 10:54:34AM +, Stuart Henderson wrote: > > Moving to ports@ ... > > > > On 2015/03/10 11:32, Alessandro DE LAURENZIS wrote: > > > Hello Stuart, > > > > > > On Tue 10/03/2015 08:28, Stuart Henderson wrote: > > > > Is this while building the port, or just installing from packages? > > > > > > Installing from packages. Isn't that expected? > > > > Not sure. > > > > So: > > > > 1. Database files in /var/db/pkg are affected by umask ("pkg_add moo" with > > umask > > 077, then you can't "pkg_info moo" as a normal user) > > > > 2. Normal installed files from the package are not affected by umask > > > > 3. @sample'd files with an explicit @mode are not affected by umask > > > > 4. @sample'd files *without* an explicit mode (e.g. normal files installed > > in > > /etc) are affected by umask > > > > ... > > > > 1 could be argued either way, but I think current behaviour is ok. > > > > 2 and 3 seem correct to me > > > > 4 is surprising to me. Marc, is that intentional? > > I kindof think 4 should be forbidden or default'd to something sane, indeed. Hi Marc, This bit me in the arse a year ago but I hadn't reported it as I was fairly new to OpenBSD back then. It would, indeed, be nice to have a sane default and able to use 'pkg_add' without issues - those that use, i.e. UMASK=077, that is :^) Regards, Raf
Re: pkg_add and umask [was misc@: Re: Cannot connect to CUPS web interface in -current]
On Tue, Mar 10, 2015 at 10:54:34AM +, Stuart Henderson wrote: > Moving to ports@ ... > > On 2015/03/10 11:32, Alessandro DE LAURENZIS wrote: > > Hello Stuart, > > > > On Tue 10/03/2015 08:28, Stuart Henderson wrote: > > > Is this while building the port, or just installing from packages? > > > > Installing from packages. Isn't that expected? > > Not sure. > > So: > > 1. Database files in /var/db/pkg are affected by umask ("pkg_add moo" with > umask > 077, then you can't "pkg_info moo" as a normal user) > > 2. Normal installed files from the package are not affected by umask > > 3. @sample'd files with an explicit @mode are not affected by umask > > 4. @sample'd files *without* an explicit mode (e.g. normal files installed in > /etc) are affected by umask > > ... > > 1 could be argued either way, but I think current behaviour is ok. > > 2 and 3 seem correct to me > > 4 is surprising to me. Marc, is that intentional? I kindof think 4 should be forbidden or default'd to something sane, indeed.
pkg_add and umask [was misc@: Re: Cannot connect to CUPS web interface in -current]
Moving to ports@ ... On 2015/03/10 11:32, Alessandro DE LAURENZIS wrote: > Hello Stuart, > > On Tue 10/03/2015 08:28, Stuart Henderson wrote: > > Is this while building the port, or just installing from packages? > > Installing from packages. Isn't that expected? Not sure. So: 1. Database files in /var/db/pkg are affected by umask ("pkg_add moo" with umask 077, then you can't "pkg_info moo" as a normal user) 2. Normal installed files from the package are not affected by umask 3. @sample'd files with an explicit @mode are not affected by umask 4. @sample'd files *without* an explicit mode (e.g. normal files installed in /etc) are affected by umask ... 1 could be argued either way, but I think current behaviour is ok. 2 and 3 seem correct to me 4 is surprising to me. Marc, is that intentional?