vsftpd: virtual user not able to upload file or create directory
2
votes
1
answer
3361
views
I created 2 virtual users for ftp (vsftpd): bholu1 and bholu2
I wanted bholu1 to have write access, access to make directory and upload permission. For that I have set up the user bholu1 as below but still he isn't able to upload file or create a directory.
( I have followed this link to achieve this)
See below: I have set per-user configurability for both user :bholu1 and bholu3
ravbholua@ravi:/etc/vsftpd_user_conf$ pwd
/etc/vsftpd_user_conf
ravbholua@ravi:/etc/vsftpd_user_conf$ cat bholu1
anon_world_readable_only=NO
write_enable=YES
anon_upload_enable=YES
ravbholua@ravi:/etc/vsftpd_user_conf$ cat bholu3
anon_world_readable_only=NO
ravbholua@ravi:/etc/vsftpd_user_conf$
Both are able to read the login directory. But as per the configuration for bholu1, he should be able to upload as well as create a new directory but he isn't able to do so.
Please see below the conf. file:
ravbholua@ravi:/etc$ cat vsftpd.conf
pam_service_name=/etc/pam.d/vsftpd.virtual
user_config_dir=/etc/vsftpd_user_conf
anonymous_enable=NO
local_enable=YES
#write_enable=NO
#anon_upload_enable=NO
#anon_mkdir_write_enable=NO
#anon_other_write_enable=NO
anon_world_readable_only=YES
chroot_local_user=YES
guest_enable=YES
guest_username=virtual
listen=YES
listen_port=10021
pasv_min_port=30000
pasv_max_port=30999
ravbholua@ravi:/etc$
It doesn't make any difference even if I uncomments all lines which are commented as shown above in the config. file.
Also have a look below to see what happens when bholu1 logs in ftp server:
ravbholua@ravbholua-Aspire-5315:~$ ftp -p rs 10021
Connected to ravi.com.
220 (vsFTPd 3.0.2)
Name (rs:ravbholua): bholu1
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> put soul.txt
local: soul.txt remote: soul.txt
227 Entering Passive Mode (109,202,101,166,117,249).
553 Could not create file.
ftp> mkdir a
550 Permission denied.
ftp>
May I request you to say what am I missing in my configuration.
Asked by Ravi
(3913 rep)
Oct 20, 2013, 06:51 AM
Last activity: Jul 11, 2025, 07:05 AM
Last activity: Jul 11, 2025, 07:05 AM