500 OOPS: cannot open config file:/etc/vsftpd/vsftpd.conf
Asked Answered
S

9

12

I don't know why it cannot open config file.

$ ll /etc/vsftpd/vsftpd.conf
-rw-r--r-- 1 xuehui1 root 4182 Aug 20  2012 /etc/vsftpd/vsftpd.conf //exits
$ sudo /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
500 OOPS: cannot open config file:/etc/vsftpd/vsftpd.conf

Here is vsftpd.conf,and it works well other linux machines(centos) but this one?Any help would be appreciated..

# Example config file /etc/vsftpd/vsftpd.conf
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=YES
#
chroot_local_user=YES
pam_service_name=vsftpd
userlist_enable=YES
#enable for standalone mode
listen=YES
tcp_wrappers=YES
use_localtime=YES
Slaton answered 30/7, 2013 at 8:36 Comment(2)
facing same issue.. any solution for this?Stereotyped
sudo chown root /etc/vsftpd/vsftpd.confSlaton
S
11

It is problem about file's owner. U should set correct owner for config /etc/vsftpd/vsftpd.conf

sudo chown root /etc/vsftpd/vsftpd.conf
Slaton answered 10/2, 2014 at 11:24 Comment(1)
Oops...Not running service as sudo was the root cause. :pJobless
S
9

Use service vsftpd [start/restart/stop], not simply vsftpd [start/restart/stop]

Stilton answered 14/4, 2014 at 10:0 Comment(0)
M
7

Depending on the OS, you may get the following error because of the incorrect command being run. For example, I ran the following command in Linux Mint 15:

sudo vsftpd restart

The output I received was:

500 OOPS: cannot read config file: restart

The correct command to restart vsftpd daemon was:

sudo restart vsftpd 

This gave the output:

vsftpd start/running, process 2231
Malek answered 9/11, 2014 at 0:16 Comment(0)
A
4

My solution was to start vsftpd with the systemctl command.

sudo systemctl start vsftpd
Antonina answered 10/5, 2016 at 11:28 Comment(0)
B
1

You are probably getting this error because of xinetd ftp is running.

The procedure mentioned below will resolve the following errors:

  • vsftpd Error : 500 OOPS: could not bind listening IPv4 socket
  • ncftpget Error : Server hangup immediately after connect

Follow the procedure mentioned below to rectify the error:

  1. To View which ftp service is running use

    • $ lsof -i | grep ftp
  2. To stop xinetd :

    • $ sudo service xinetd stop
  3. After stoping xinetd restart your vsftpd service by typing :

    • $ /etc/init.d/vsftpd restart (Become root and run this command)
  4. Also check the vsftpd.conf with this one

    • listen=YES

    • local_enable=YES

    • write_enable=YES

    • local_umask=022

    • dirmessage_enable=YES

    • use_localtime=YES

    • xferlog_enable=YES

    • secure_chroot_dir=/var/run/vsftpd/empty

    • pam_service_name=vsftpd

    • rsa_cert_file=/etc/ssl/private/vsftpd.pem

Brigitte answered 28/12, 2015 at 13:55 Comment(0)
R
0

This did the trick for me

sudo restart vsftpd
Radio answered 3/4, 2015 at 13:21 Comment(0)
R
0

On macOS, a freshly installed vsftpd process fails with that message. I have to tell it where my config file is:

$ sudo vsftpd/3.0.3/sbin/vsftpd /etc/vsftpd.conf & [1] 5735

Reamy answered 25/3, 2017 at 21:30 Comment(0)
P
0

This worked for me:

sudo systemctl restart vsftpd.service
Pvc answered 1/7, 2019 at 16:29 Comment(0)
S
-1

I did this

sudo dpkg-reconfigure vsftpd
Sewan answered 10/12, 2015 at 5:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.