[Dovecot] umask 007 ineffective with newly created Maildir message

Ben Winslow rain at bluecherry.net
Thu Dec 21 16:35:53 UTC 2006


On Thu, 21 Dec 2006 09:58:35 +0000
Steve James <s.james at bigfoot.com> wrote:

> Besides, I don't think the use of hardlinks should be relevant: two directory
> entries that link to the same file are still two different directory entries
> with their own, individual ownerships and permissions. I could do the
> experiment if that's useful?

No they're not.  :)  Hard links are two directory entries ('names')
pointing to the same inode: permissions, file ownership, timestamps,
etc. are all set at the inode level.

(winslowb at winslowb:/tmp) touch foo                           (11:32am/3/pts/42)
(winslowb at winslowb:/tmp) ls -l foo                           (11:32am/4/pts/42)
-rw-r--r-- 1 winslowb winslowb 0 2006-12-21 11:32 foo
(winslowb at winslowb:/tmp) ln foo bar                          (11:32am/5/pts/42)
(winslowb at winslowb:/tmp) ls -l bar                           (11:32am/6/pts/42)
-rw-r--r-- 2 winslowb winslowb 0 2006-12-21 11:32 bar
(winslowb at winslowb:/tmp) chmod 600 bar                       (11:32am/7/pts/42)
(winslowb at winslowb:/tmp) ls -l foo bar                       (11:32am/8/pts/42)
-rw------- 2 winslowb winslowb 0 2006-12-21 11:32 bar
-rw------- 2 winslowb winslowb 0 2006-12-21 11:32 foo

I think that probably makes umask irrelevant -- but whether dovecot
should chmod things when maildir_copy_with_hardlinks is on is a
separate discussion.

HTH,
--
Ben Winslow <rain at bluecherry.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20061221/f031ee11/attachment.pgp 


More information about the dovecot mailing list