procmail
[Top] [All Lists]

Re: UMASK

1998-09-10 03:19:53
On Thu, 10 Sep 1998 11:53:00 +0200,
Martin Schulze <joey(_at_)finlandia(_dot_)Infodrom(_dot_)North(_dot_)DE> wrote:
Setting UMASK=022 ends up in files that are executable - also readable
by anybody.
So this is the wrong umask, but which is the correct one?

033. 

However, tangentially, I noticed something funny here:

 $ cat moo.rc
 SHELL=/bin/sh
 UMASK=022
 MAILDIR=.
 DEFAULT=oops
 VERBOSE=yes
 :0:
 foobar

 $ procmail ./moo.rc <moo.rc
 procmail: [11304] Thu Sep 10 13:14:46 1998
 procmail: Locking "foobar.lock"
 procmail: [11304] Thu Sep 10 13:14:47 1998
 procmail: Assigning "LASTFOLDER=foobar"
 procmail: Opening "foobar"
 procmail: Acquiring kernel-lock
 procmail: Unlocking "foobar.lock"
   Folder: foobar                                                            71

 $ ls -l foobar
 -rw-r--r-x   1 reriksso system       2962 Sep 10 13:14 foobar
       ^  ^
Is there a bug in Procmail's umask handling?

Anyhow, normally, under Unix, the creat system call will set default
permissions of 666 and the umask can only be used to mask off the bits
you don't want (and not to e.g. add x bits). Shouldn't Procmail work
this way, too, just to be consistent with the rest of the system?

/* era */

-- 
Bot Bait: It shouldn't even matter whether  (`')  Just  (`')  http://www.iki
I am a resident of the State of Washington   \/ Married! \/   .fi/~era/

<Prev in Thread] Current Thread [Next in Thread>
  • UMASK, Martin Schulze
    • Re: UMASK, era eriksson <=