Link to home
Start Free TrialLog in
Avatar of Mark
Mark

asked on

Why is PROFTPD shutting down on it's own

I have ProFTPD running on Ubuntu 13.03 LTS... every 48 hours or so it shuts down.

It starts up as a standalone service:

Here is an except from the logfile:

2014-12-14 15:44:35,887 mydomain.com proftpd[11113] l1.mydomain.com (my hostname and ip): ROOT PRIVS: unable to setegid(): Operation not permitted
2014-12-14 15:44:35,896 mydomain.com proftpd[11113] l1.mydomain.com (my hostname and ip): RELINQUISH PRIVS: unable to seteuid(PR_ROOT_UID): Operation not permitted
2014-12-14 15:44:35,896 mydomain.com proftpd[11113] l1.mydomain.com (my hostname and ip): FTP session closed.
2014-12-15 06:49:58,200 mydomain.com proftpd[23966] l1.mydomain.com: ProFTPD killed (signal 15)
2014-12-15 06:49:58,201 mydomain.com proftpd[23966] l1.mydomain.com: ProFTPD 1.3.5rc3 standalone mode SHUTDOWN
Avatar of Rob G
Rob G
Flag of United States of America image

Unless you have updates setup to automatically download, install and reboot, it sounds like you have hardware issues..
There is ubuntu 12.04 LTS and 14.04 lts
Do you have a log rotation script that restarts system ftpd to reopen xferlogs? Maybe proftpd uses different signalling and restart of other is stop for other?
Avatar of Mark
Mark

ASKER

I meant 14.04 LTS. I doubt there is hardware issues as I am using a Linode VOS
/etc/logrotate.d/proftpd-basic would rotate logs daily and restart proftpd
if proftpd cannot be restarted by invoke-rc.d proftpd restart it will obviously not come back after this restart
Does it restart well?
Avatar of Mark

ASKER

Please be more specific as to what command I should issue to check.

Also, as an alternative, can someone suggest a bash script that I can cron to check if proftpd is running and if not to start it.
Any logrotate script mentioning proftpd's pid fils or log files.
"cat" command is to check
Avatar of Mark

ASKER

file /etc/logroate.d/proftpd-basic contains:

/var/log/proftpd/proftpd.log
/var/log/proftpd/controls.log
{
        weekly
        missingok
        rotate 7
        compress
        delaycompress
        notifempty
        create 640 root adm
        sharedscripts
        postrotate
                # reload could be not sufficient for all logs, a restart is safer
                invoke-rc.d proftpd restart 2>/dev/null >/dev/null || true
        endscript
}

/var/log/proftpd/xferlog
/var/log/proftpd/xferreport
{
        monthly
        missingok
        rotate 7
        compress
        delaycompress
        notifempty
        create 640 root adm
        sharedscripts
        prerotate
        endscript
        postrotate
                # reload could be not sufficient for all logs, a restart is safer
                invoke-rc.d proftpd restart 2>/dev/null >/dev/null || true
                # run ftpstats on past transfer log
                ftpstats -a -r -l 2 -d -h -f /var/log/proftpd/xferlog.0 2>/dev/null >/var/log/proftpd/xferreport || true
        endscript
}

Open in new window


Can I just get a bash script to detect if proftpd is not running and start it .. I will just cron it every hour or so....

Thanks
find proftpd.service under /etc/systemd
Add something like "restart = always" to service file.
Probably proftpd upgrades will change that back, so keep an eye on apt.
Avatar of Mark

ASKER

I cannot find any reference to proftpd:

root@domain:/etc/systemd# grep -Rin proftpd *
root@domain:/etc/systemd#
ASKER CERTIFIED SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark

ASKER

I just added a monitor through we min to start proftpd if it detects it's down but thanks anyway