fetchmail-friends
[Top] [All Lists]

Re: [fetchmail]Fetchmail + crontab trouble

2004-11-14 22:02:24

On Mon, 15 Nov 2004, Christoph Pilka wrote:


So for logging fetchmail's activity i changed it to:
*/5 * * * *     ctp     strace fetchmail -f /home/ctp/.fetchmailrc

and get system mails for root, which include (these are the last lines of the 
strace):

...
rt_sigaction(SIGPIPE, {0x8054e3b, [], SA_RESTART}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {0x8054e3b, [], SA_RESTART}, {SIG_DFL}, 8) = 0
open("//.fetchmail.pid", O_WRONLY|O_CREAT|O_EXCL|O_SYNC, 0666) = -1 EACCES 
(Permission denied)
write(2, "fetchmail: lock creation failed."..., 33fetchmail: lock creation 
failed.
) = 33
exit_group(8)                           = ?

so i´m confused about the line 'open("//.fetchmail.pid", O_WRONLY ...'. 
normally there should be a 'open("/home/ctp/.fetchmail.pid", O_WRONLY ...' as 
i see stracing fetchmail running from a shell directely.
Anyone has an idea what´s going wrong? The permissions for /home/ctp are set 
correctely:
$ ls -lad /home/ctp
drwxr-xr-x  65 ctp users 4096 Nov 15 05:53 /home/ctp
and there is no a lockfile from a previous session (as i read it should be a 
problem for fetchmail if there one would exist)
i´m really confused with this behaviour of fetchmail and i hope not to be 
alone with this trouble ;-)



As root su - ctp then pwd. If you are in / then check /etc/passwd or
wherever the user account is configured. If the home directory in there
points to /home/ctp then you have a problem with cron not setting the HOME
variable.

Cheers,

Larry.



<Prev in Thread] Current Thread [Next in Thread>