![]() |
Second vsftpd user cannot access defined home at /var/www/html/imageParking
https://www.ryadel.com/en/vsftpd-con...fic-directory/
Hi, I followed the instructions above but the second user gets the following message when login from filezila: Comando: USER parking Resposta: 331 Please specify the password. Comando: PASS ********* Resposta: 500 OOPS: cannot change directory:/home/parking user1 works fine. myname@myhost:/etc$ cat vsftpd.userlist user1 parking cat /etc/vsftpd.conf ... user_config_dir=/etc/vsftpd/user_config_dir/ myname@myhost:/etc/vsftpd/user_config_dir$ ls user1 parking myname@myhost:/etc/vsftpd/user_config_dir$ cat parking local_root=/var/www/html/imageParking write_enable=YES myname@myhost:/var/www/html$ ls -l ... drwxr-xr-x 2 parking parking 4096 Mar 17 06:10 imageParking What Am I doing wrong? Assistance welcome. |
Quote:
Check again the configuration and keep in mind that without a "userlist_file" directive, the default userlist_file is /etc/vsftpd.user_list and not /etc/vsftpd.userlist as in your case. So add the following in vsftpd.conf Code:
userlist_file=/etc/vsftpd.userlist |
I think the issue is that the home directory does not exist…the error says
Code:
cannot change directory:/home/parking /var/www/html/parking I think the parking user’s home needs to be set to /var/www/html/parking See man passwd for how to do that…or if you know how, edit /etc/passwd Pretty sure that vsftp confg files have nothing to do with it (‘tho I’ve not used any ftp server or client in a long time sftp/ssh is the way to go, IMO) |
Hi, thank you both for your valuable contribution but not solved the problem yet.
I have started with the most familiar: Lines that I added to /etc/vsftpd.conf (instructions on the link on my original post): allow_writeable_chroot=YES pasv_enable=YES pasv_min_port=40000 pasv_max_port=41000 userlist_enable=YES userlist_file=/etc/vsftpd.userlist userlist_deny=NO virtual_use_local_privs=YES user_config_dir=/etc/vsftpd/user_config_dir/ myUserName@vps37290:/etc$ cat vsftpd.userlist user1 parking myUserName@vps37290:/etc$ ls /etc/vsftpd/user_config_dir user1 parking myUserName@vps37290:/etc$ cat /etc/vsftpd/user_config_dir/parking local_root=/var/www/html/imageParking write_enable=YES Somehow user1 works OK: myUserName@vps37290:/etc$ cat /etc/vsftpd/user_config_dir/user1 local_root=/var/www/html/imageUpload write_enable=YES Filezila connects, uploads and can also delete files under user1. I created user parking after user1 was already working. Could something be wrong with user parking that prevents him to work with vsftpd? I am not such an advanced Linux user but will try to look into scasey kind directions as well and see if I can make it work without breaking anything else. Thank you both. |
Quote:
Did you restart vsftpd after making changes? |
Hi, I did not make any changes, it was already with the lines you suggested.
I did not include the whole set of lines I included in vsftpd.conf because I did not know they were that relevant. But the vsftpd.conf was always with those lines on my last post. After that I checked the existence of home/parking an the folder was not there So I created and rebooted the VM When it came online I tested with ftpzila and it worked Thanks |
Quote:
In your OP, you said that the user parking should use the directory /var/www/html/imageParking for this. |
Quote:
I also aplied proper ownership and access to user parking on its newly created home directory What I said was that it seems to have started working as soon as I created directory "parking" under /home. I found that when I decided to login as user parking from terminal and got the message that /home/parking could not be found. After creating the directory /home/parking for user parking I then tested filezila (as user parking) and everything started to work as intended. Thanks |
All times are GMT -5. The time now is 12:45 PM. |