I
I
Ivan2016-10-20 13:03:42
CentOS
Ivan, 2016-10-20 13:03:42

How to set up vsftpd correctly?

Hello. Raised and configured ftp on centos 6.8, made authorization through AD. The config specifies local_root=/DATA, but when connecting, the user falls to the root. What's wrong?

cat vsftpd.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
use_localtime=YES
dual_log_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/xferlog
xferlog_std_format=YES
ascii_upload_enable=YES
ascii_download_enable=YES
chroot_local_user=YES
listen=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
session_support=YES
local_root=/DATA

here is the result
ftp localhost
Trying ::1...
ftp: connect to address ::1Connection refused
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
220 (vsFTPd 2.2.2)
Name (localhost:root): [email protected]
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
257 "/"
ftp>

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey, 2016-10-20
@Pumboss

What do you want? pwd shows the root for the user.
But if you created a file via ftp, but it is not located in / DATA, then there may already be options

I
Ivan, 2016-10-20
@bordakovskiy

The DATA directory contains files and folders. But when browsing ftp

ftp> pwd
257 "/"
ftp> ls
227 Entering Passive Mode (127,0,0,1,96,226).
150 Here comes the directory listing.
226 Transfer done (but failed to open directory).
ftp>

A
alegzz, 2016-10-20
@alegzz

apparently, there are not enough rights to go to the /DATA directory. what rights are set?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question