1

I have a strange problema with a fresh install of ProFTPD on Ubuntu 20 LTS.
I noticed that after changing some option on the configuration files, when I run services proftpd restart the modifications does not apply, only if I restart the system the changes will make effects.

So I try to sop the service with services proftpd stop but I can keep connecting with the ftp client. So there is something weird here. Can you help me on what to verify?

some output

root@b205d:~# which proftpd
/usr/sbin/proftpd
root@b205d:~# whereis proftpd
proftpd: /usr/sbin/proftpd /usr/lib/proftpd /etc/proftpd /usr/share/proftpd /usr/share/man/man8/proftpd.8.gz
Kreker
  • 458
  • 4
  • 10
  • 22
  • test systemctl status proftpd then check if the process is still running, f.e. netstat -atulpen |grep "YOURFTPPORT" then find out who started that process via ps -ef |grep YOURPROFTPD PID then you know who starts the "potential" 2nd proftpd. – Dennis Nolte Aug 27 '20 at 08:35

2 Answers2

1
  1. Check the output of systemctl status proftpd.service. You should see the tree of running processes with PID specification.

  2. Then check tht output of ss -tlnp sport == :21. You will see the listening sockets for ftp control connections and the processes with pids, those own these sockets.

  3. Compare the PIDs from two commands above.

  4. Check the output of systemctl cat proftpd.service. Maybe some environment variables have been read. (Environment statements of [Service] section). Also check the Type statement inside [Service]. The wrong value maybe cause strange effects.

  5. Try to reload/restart the proftpd (systemctl reload proftpd.service and systemctl restart proftpd.service). Check the output of journalctl -u proftpd.service.

  6. Try to stop the proftpd service and run it manually with same command line, that was been displayed in the status output. Try to change the config and send the reload signal to the service.

  7. If nothing above didn't help, run the proftpd under strace and dive into the internals.

Anton Danilov
  • 5,082
  • 2
  • 13
  • 23
  • I saw this error while using start/stop deamon (which does not work) `Aug 31 09:22:09 proftpd[637300]: start-stop-daemon: matching on world-writable pidfile /run/proftpd.pid is insecure Aug 31 09:22:09 proftpd[637292]: ...fail! Aug 31 09:22:09 systemd[1]: proftpd.service: Control process exited, code=exited, status=1/FAILURE Aug 31 09:22:09 systemd[1]: proftpd.service: Failed with result 'exit-code'. Aug 31 09:22:09 systemd[1]: Failed to start LSB: Starts ProFTPD daemon.` any suggestions? – Kreker Aug 31 '20 at 07:30
  • Start with `journalctl -u proftpd.service` and check the output. There are various reasons for start failure. Check output of `( test -f /run/proftpd.pid && ps $( cat /run/proftpd.pid ) ) || echo 'proftpd pid not found' ` command. It check the pid file and if it exists, check the process with this pid, otherwise prints 'proftpd pid not found' string. – Anton Danilov Sep 01 '20 at 08:19
1

As of Ubuntu 16 most services are controlled via systemd. You can manipulate systemd services via systemctl commands.

To restart proftpd on Ubuntu 20 you'll need to use these commands:

systemctl restart proftpd.service

Then see if it is running:

systemctl status proftpd.service

Petey_Woof
  • 79
  • 4