2

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.

2
  • Fistly, I would uncomment and change 'write_enable=NO' to 'write_enable=YES' Try that and let us know if bholu1 still has a problem creating files and dirs Commented Oct 25, 2013 at 19:14
  • @andrew I had checked this earlier also. Now also I checked by changing from 'write_enable=NO' to 'write_enable=YES'. Still bholu1 isn't able to create directories or upload any files from local machine. Commented Oct 26, 2013 at 3:52

1 Answer 1

0

Try this for virtual users to enable write access:

virtual_use_local_privs=YES

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.