fetchmail-friends
[Top] [All Lists]

[fetchmail]Fetchmail + crontab trouble

2004-11-14 21:14:23
hi folks,

i´m running fetchmail 6.2.5 on a gentoo box, but cannot get it working using 
crontab. running fetchmail directely from shell works fine, but as i put

*/5 * * * *     ctp     fetchmail -f /home/ctp/.fetchmailrc

in my /etc/crontab i get mails for root telling me "fetchmail: lock creation 
failed"

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 ;-)

chris


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