13 Oct 2011 19:06
gid problem
Dimitri Maziuk <dmaziuk <at> bmrb.wisc.edu>
2011-10-13 17:06:07 GMT
2011-10-13 17:06:07 GMT
Hi everyone,
I've a simple mail processing script set up as follows:
- a user, say mailproc:mygroup, has its .mailfilter end with
to "| ~/.script.py"
- script.py saves the message to a file on a shared drive that real
users will use later on,
- in order for this to work, the files are group-writable by "mygroup"
and real users are members of mygroup,
- maildrop is the local delivery agent for postfix, master.cf has
maildrop unix - n n - - pipe
flags=DRhu user=daemon argv=/usr/bin/maildrop -d ${recipient}
This works fine of fedora 8 which has maildrop-2.0.4 installed suid/sgid
root:mail.
On centos 6 script.py fails with permission denied when trying to open
output file for append. Centos 6 has maildrop-2.5.0 (ATrpms build), also
suid/sgid root:mail.
Logging os.getuid() and os.getgroups() from the script results in
"mailproc:mygroup" on fedora 8 and in "mailproc:mail" on centos 6. The
script works from command line on centos and "groups" returns "mygroup".
So it looks like maildrop-2.0.4 on fedora changes its uid and gid to
those of the user specified in "-d" whereas 2.5.0 on centos changes only
its uid but not gid.
Was that a deliberate change in maildrop?
(Continue reading)
RSS Feed