I can't cage the users in vsftpd

by Mr Brown   Last Updated August 14, 2019 17:02 PM

I have installed vsftpd in ubuntu server 18.04.

I want two users in the FTP server, that access to a directory, the same, but a user has to write permission's and the other not.

In the settings I have to follow it:

anonymous_enable=NO
local_enable=YES
write_enable_YES
chroot_local_user=YES

I created the users profesorado and webserver

adduser profesorado

adduser webserver

the user profesorado has this permissions: d rwx r-x r-x (he has this group permissions' , because should not write) group=profesorado owner=profesorado the user webserver has this permissions: d rwx rwx r-x (the has this group permissions', because will can write) group=webserver owner=webserver

I want that the two users only to access to the directory of the web server in /home/webserver/, so I has edited the file /etc/passwd, changing the follow:

webserver:x:1000:1000:,,,:/home/webserver/:/bin/ftp
profesorado:x:1002:1002:,,,:/home/webserver/:/bin/ftp

To restart the service /etc/init.d/vsftpd restart

But,when I access to the FTP with the users, not connect

220 (vsFTPd 3.0.3)
Name (192.168.?.?:administrador): webserver
331 Please specify the password.
Password:
500 OOPS: vsftpd: refusing to run with writable root inside chroot()
Login failed.
421 Service not available, remote server has closed connection

However, when I uncomment this:

#local_enable=YES
#write_enable=YES
#chroot_local_user=YES

I can to access to client FTP of the two users, but within cage looking the / of the server.

How to I can cage the users?

P.D: I want that the users to access to a directory, the same, because I am creating a web server with FTP access.

I created a ghost terminal /bin/ftp

Tags : vsftpd


Related Questions


vsftpd login incorrect issue

Updated April 04, 2015 15:00 PM

I can't login as anonymous user to vsftpd server

Updated April 22, 2015 01:00 AM



How to see currently connected clients of vsftp

Updated May 04, 2015 00:00 AM