On Jan 2, 8:02 pm, Cameron Simpson <c...@zip.com.au> wrote: > On 02Jan2010 15:21, cassiope <f...@u.washington.edu> wrote: > | [...] I want > | to save a copy of the email in a particular directory which is > | accessible to the Windows clients via samba. > | > | The strange thing is that even with the right user-id, I cannot seem > | to write to the directory, getting an IOError exception. Changing the > | directory to world-writable fixes this. I can confirm the uid and gid > | for the script by having the script print these values just before > | trying to create/write the file. Becoming the same lesser user, I > | have no problem writing a file to the same directory. > > Can you show us: > - the directory user and group ownership and permissions > - the daemon's user and group values?
Directory permissions: 774 Directory ownership: "lesser user", "special group" where /etc/group has "special group" members including the "lesser user", as well as those who are expected to use the daemon, but not root. Script ownership: "lesser user"; permissions 755 Daemon ownership: root; permissions: 755 (always started by root). The script also has to connect to a postgresql database for part of its work - that part works, > You can also strace your daemon: > > strace -f -e trace=file your-daemon your-daemon-args... 2>strace.out > > and then examine the log for the precise UNIX-level failure. > > Cheers, > -- > Cameron Simpson <c...@zip.com.au> DoD#743http://www.cskk.ezoshosting.com/cs/ > > Money won't buy happiness, but it will pay the salary of a large research > staff to study the problem. - Bill Vaughan Thanks, Cameron (and Steve and Christian). My first shot with strace (it's been awhile since I've used that - I think your syntax may be a tiny bit off - but it's probably the tool I need to use. Will explore further... -- http://mail.python.org/mailman/listinfo/python-list