On 10Jul2019 21:35, Tim <ignored_mail...@yahoo.com.au> wrote:
For the last umpteen years, I did this in /etc/rc.local:
 su tim -c "/usr/bin/fetchmail -d 900"

And likewise, for several other users, but with different time periods
to minimise overlaps.

But that won't work, anymore.  The log returns:

 rc.local: fetchmail: open: /home/tim/.fetchmailrc: Permission denied

My /home/tim permissions always were, and always will be:

 drwx------. 24 tim    tim     4096 Jul 10 21:23 tim

I won't be making the permissions more permissive.

So, how do I do something equivalent?  (That auto-starts the fetchmail
daemon going any time the server is booted, and doesn't require the
user to log on.)

I just wanted to second the crontab suggestion. For example, mine looks like this:

 [~]fleet*> crontab -l
 MAILTO=c...@cskk.id.au
 SHELL=/opt/local/bin/zsh
 @reboot $HOME/rc/cron/BOOT
 30 1 * * * . $HOME/.profile; flag ISP_OFF_PEAK 1
 30 6 * * * . $HOME/.profile; flag ISP_OFF_PEAK 0

and I put my boot stuff in ~/rc/cron/BOOT.

And I also suggest that you suspect selinux. Your permissions look fine, ergo selinux is getting in the way with its uninspectable context dependent rules. However, it does make copious logs IIRC.

I would not suspect the su command; you'd get a different error message like su failed or forbidden. Your message pretty clearly says that fetchmail gets to run, but can't access the .fetchmailrc. So su worked.

Cheers,
Cameron Simpson <c...@cskk.id.au>
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to