Re: [Exim] directory permissions

Pàgina inicial
Delete this message
Reply to this message
Autor: Andy Wettstein
Data:  
A: Nigel Wade
CC: exim-users
Assumpte: Re: [Exim] directory permissions
On Mon, Aug 16, 2004 at 11:51:17AM +0100, Nigel Wade wrote:
> Andy Wettstein wrote:
>
> >
> >After a little more investigation the directories get group owned
> >by the group of the parent directory. So if I change the group
> >ownership of imapshared to sysadm all directories under imapshared get
> >sysadm group owned. I'm not sure how this makes any sense.
> >
>
> There is a feature of some OS/filesystems which propogates group
> permission/ownership into newly created directories. Could this be the
> issue here?


Yes, indeed. After some research it turns out the BSD behavior is to set
the group ownership of new files/directories is to the parent directory
group owner, while Linux (SysV) will use the egid for group ownership.
After a look over the exim source, if my C interpretation is correct I
think exim only does a chown if the euid is root:

BOOL use_chown = parent == spool_directory && geteuid() == root_uid;
...
if (use_chown) Uchown(buffer, exim_uid, exim_gid);

So I wonder what the purpose of that if statement is because I don't
think this would ever really happen because exim won't deliver as
root (unless you change the fixed_never_users at compile time).

The appendfile transport always does the chown when it creates files so
that would explain the correct group for that.

>
> It might be setuid bits on owner/group access, or the "sticky" bit.


nope, this is the default (and apparently non-changeable) behavior for
BSD no matter what extra bits are set.

>
>
> --
> Nigel Wade, System Administrator, Space Plasma Physics Group,
>             University of Leicester, Leicester, LE1 7RH, UK
> E-mail :    nmw@???
> Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555