We pretend to install more than one website in the CentOS vps, and assign one or more ftp user(s) to each website folder.
Regards.
LinuxLinux Security
Last Comment
Sandy
8/22/2022 - Mon
Mazdajai
Assuming you already created local user account, it will most likely in their respective home drive in /etc/passwd once they logged in via ftp. We won't know until you provide more information on the type of ftp software and configuration file.
dimensionav
ASKER
First of all, I have tried to get into FTP, but I couldn't never be connected, I tested the user and password directly on the server and everything is ok.
I have installed LAMP, so the idea is to get access to home folder of each website there.
Sandy
OK...
1. Create a local user having access to that directory
2. Configure VSFTPD with default parameters.
3. either disable SELinux or configure setsebool for ftp_home_dir and ftp_full_access
You users will be able to access web folders via ftp. in case issues you might need to allow few booleans of http... depends on version and distro you are using
Add the "vftpuser" in the file /etc/vsftpd/user_list
And Try connecting...
Sandy
Give me output of below
#sestatus
#setsebool -b | grep ftp
TY/SA
dimensionav
ASKER
NARANTHIRAN:
After adding vftpuser to user_list file I got the error "530 Permission Denied" (Actually the link from I followed the procedure of setting up vsftp says that adding the user will block it).
Now its working, but the FTP redirects to the user local folder, in this case "/home/test/" folder, is there any way to make the ftp user points to specific virtual host, lets say /var/www/html/mywebsite1 or /var/www/html/mywebsite2 ?
Thanks in advance.
Naranthiran D
Yes you can Point to the specific directory u want...
By editing the following file against the user and add the directory u want to point..
For example:
Username:x:502:503::/var/www/html/mywebsite1:/bin/bash
dimensionav
ASKER
Sorry, could you explain a little bit more how to perform that command and the file edition?
Thanks.