[SOLVED] Fetchmail cannot start when i restart my server
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I recently setup fetchmail on my server and its been running awesome! However, I noticed yesterday when the machine switched off due to a power cut, that fetchmail is having an error and will not start. Here is the error:
couldn't time-check the run-control file
fetchmail: lstat: /root/.fetchmailrc: Permission denied
However, when i start it manually thus: /usr/bin/fetchmail -f /root/.fetchmailrc, it works!
I recently setup fetchmail on my server and its been running awesome! However, I noticed yesterday when the machine switched off due to a power cut, that fetchmail is having an error and will not start. Here is the error:
couldn't time-check the run-control file
fetchmail: lstat: /root/.fetchmailrc: Permission denied
However, when i start it manually thus: /usr/bin/fetchmail -f /root/.fetchmailrc, it works!
Any ideas?
Regards,
BJ
If your distro starts, it uses the scripts in /etc/init.d
Maybe you can take a look there and see what line is causing this problem and debug it
I recently setup fetchmail on my server and its been running awesome! However, I noticed yesterday when the machine switched off due to a power cut, that fetchmail is having an error and will not start. Here is the error:
couldn't time-check the run-control file
fetchmail: lstat: /root/.fetchmailrc: Permission denied
However, when i start it manually thus: /usr/bin/fetchmail -f /root/.fetchmailrc, it works!
Any ideas?
Regards,
BJ
Hi BJ ,
Based on error output it looks like issue is related with user/group permission, could you pls post '#ls -lrth' on fetchmailrc file.
#!/bin/sh
#
# fetchmail This shell script takes care of starting and stopping
# fetchmail.
#
# chkconfig: 2345 81 45
# description: The Fetchmail daemons allows to retrieve mail using
various
# mail protocols and route them to the local MTA just as if
# the mail was sent directly to the local MTA. This is
# specially useful on intermittent dial-up connections.
# processname: fetchmail
# config: /etc/fetchmailrc
# author[s]:
# Andrea Sterbini <a.sterbini@itelcad.it>
# ObiTuarY <obituary@freshmeat.net>
I am a bit new to linux. what am i suppose to do with the above? sorry to be a bother. please may you explain a bit
Regards,
BJ
What kirukan is trying to suggest is, since currently fetchmailrc file is in /root folder which will have permissions set to be executable only by root user, so once you move it back to /etc directory it should start automatically during system startup( provided it is owned by system user "mail" in this case )
in case if it is not owned by system user " mail" , you may execute
#chown mail:mail <path to fecthmailrc file>
Probably fetchmail runs not as a root user.
So the config should be /etc/fetchmailrc and should have user and group mail.
THen it will be started.
Otherwhise CentOS will try to start it. But it will fail with permission denied.
It probably runs if you start it yourself, when you are root.
Thanks very much guys. this did the trick! i just changed the location of my /root/.fetchmailrc file to /etc/fetchmailrc and its working! thanks for the help.
Thanks very much guys. this did the trick! i just changed the location of my /root/.fetchmailrc file to /etc/fetchmailrc and its working! thanks for the help.
Regards,
BJ
In the thread tools above this page you can mark your topic as solved
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.