On Mon, Jan 05, 2004 at 08:02:19PM -0500, Thomas H. George wrote:
> Final two lines of strace fetchmail run from /home/tom:
> 
>    open("/home/tom/.fetchmail.pid", O_WRONLY|O_CREAT|O_EXCL|O_SYNC, 
> 0666) = -1 EACCESS (Permission Denied)

This clearly means the program didn't have the write permission to the
directory /home/tom, or was prevented from writing by other means
extending the Unix security model (kernel patches such as RSBAC).

You either ran fetchmail with a UID != tom (id -u; ls -l `which
fetchmail`; fetchmail <options>), or tom can't write to /home/tom (ls
-ld /home/tom).  Note that switching users while doing these experiments
can lead to unexpected results.

> I tried creating a file .fetchmail.pid with chown tom and chmod 666.  

It made no sense to chown tom if you were tom.  Did you do this as root?

> This gave the same result with (File Exists) instead of (Permission Denied).

As well as it should.

> I also found and read /usr/share/doc/fetchmail/README.Debian.gz which 
> notes the program wont run if there is no /etc/fetchmailrc file.  I 
> copied /usr/share/doc/fetchmail/examples/fetchmailrc.exampe.gz to 
> /etc/fetchmailrc and edited the last lines to read
> 
>    poll mail.spininternet.com with protocol pop3
>       user 'xyz' there with password * is 'tom' here
> 
> and changed the file to be chmod 0600, chown fetchmail.  This is 
> apparently not enough as /etc/init.d/fetchmail debug-run does nothing so 
> /etc/init.d/fetchmail debug-run strace -o /tmp/strace.out as suggested 
> in README.Debian.gz produces no output.  However, strace -o 

Impossible.  The least -o file would have the following one line:

(%:~)- strace -o /dev/fd/1 /dev/null 2>/dev/null
execve("/dev/null", ["/dev/null"], [/* 14 vars */]) = 0

> /tmp/strace.out fetchmail run from /home/tom works/

Again: as root, or as tom?

> Does any of this provide a clue as to what is going on?

Seems like your messing with switching from root to tom, back and forth.
Maybe another users too.  Also seems you omit to note what actualy
happens (null strace).  Fetchmail works as it should, check the
/home/tom permissions.  Check the ownership and permissions of
/home/tom, and the files below.  If nothing worked, post a typescript of
the actions (script(1)).  Peruse id(1), ls -ld, and friends, so we know
what exactly is going on.

Last but not least, not that my .signature growed again ;-/

-- 
Jan Minar                   "Please don't CC me, I'm subscribed." x 8

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to