vsftpd: 500 OOPS: config file not owned by correct user, or not a file

As it is in the topic the problem is with vsftpd. For some time i used it normally and everything worked good. But once i started vsftpd and it gave out the message:

500 OOPS: config file not owned by correct user, or not a file

After some searching i tried:

  • to change the owner of the vsftpd.conf file by sudo chown root vsftpd.conf;

  • to remove vsftpd and install again;

  • to purge vsftpd and install again;
  • to delete the content of the conf file and paste examples from internet.

Nothing helped, it did not work since. It is Ubuntu 16.04

Thank you in advance.


Solution 1:

I don't know if you still need this, but I had the same problem recently I Google around and found This Page. The major difference I found was that I was trying to start the server by typing:

# vsftpd

Instead of:

# systemctl start vsftpd

in the terminal. I hope this helped.

Solution 2:

$ vsftpd &
[1] 7685
500 OOPS: config file not owned by correct user, or not a file

The error is seen while running vsftpd as a background process.
I could not resolve the error, but I successfully ran the service.

Running the following command's(In Ubuntu) worked out for me:

$ sudo chown root:root /etc/vsftpd.conf
$ ls -lt  /etc/vsftpd.conf 
-rwxr-xr-x 1 root root 4429 Sep 12 00:26 /etc/vsftpd.conf
$ sudo service vsftpd start
$ sudo service vsftpd status
vsftpd.service - vsftpd FTP server
Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-09-12 00:47:46 IST; 4s ago
Process: 7882 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS)
Main PID: 7883 (vsftpd)
Tasks: 1 (limit: 4531)
CGroup: /system.slice/vsftpd.service
        └─7883 /usr/sbin/vsftpd /etc/vsftpd.conf
Sep 12 00:47:46 <Mysystemname>-G1 systemd[1]: Starting vsftpd FTP server...
Sep 12 00:47:46 <Mysystemname>-G1 systemd[1]: Started vsftpd FTP server.

Note: After this status, the FTP was successfully running on port 21.

$ nmap 127.0.0.1
  Starting Nmap 7.60 ( https://nmap.org ) at 2019-09-12 00:50 IST
  Nmap scan report for localhost (127.0.0.1)
  Host is up (0.00012s latency).
  Not shown: 997 closed ports
  PORT    STATE SERVICE
  21/tcp  open  ftp