Hello,
Iwant to set up vsftp so that
- several named users can connect to the ftp and do all operations on the whole filesystem (as long as their permission allows it), including upload
- one given user (also named) can connect to the ftp but is chrooted in his own home directory. He can only do some very limited commands. Basically, he just needs to upload one or more files and see if they uploaded well
- Anonymous FTP should not be allowed
My configuration so far is quoted below. Everything is working well except that if any of the users want to upload anything, it fails with code 553 "Could not create file.".
Code:
ftp localhost
Connected to localhost.
220 Welcome to my FTP service.
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (localhost:root): adonix
331 Please specify the password.
Password:
230 Login successful.
ftp> ls
227 Entering Passive Mode (127,0,0,1,124,21)
150 Here comes the directory listing.
drwxrwx--x 2 278 501 4096 Mar 13 2002 save
226 Directory send OK.
ftp> put /tmp/adonix-test .
local: /tmp/adonix-test remote: .
227 Entering Passive Mode (127,0,0,1,110,28)
553 Could not create file.
ftp> put /tmp/adonix-test /fibudat/transfer/253
local: /tmp/adonix-test remote: /fibudat/transfer/253
227 Entering Passive Mode (127,0,0,1,69,165)
553 Could not create file.
ftp> bye
The user adonix above is chrooted in his own home /fibudat/transfer/253. The directory has 777 and is owned by adonix
Code:
drwxrwxrwx 3 adonix alcib 4096 30. Jun 11:45 253
Why do I get "553 Could not create file"?
So here is my configuration:
Code:
# explicitely disallow anonymous
anonymous_enable=NO
# the users who can use have to be local users
local_enable=YES
# I'm not sure if this is needed, but until the upload is working, this stays
write_enable=YES
# This is the default in RHEL3, don't know if it needs changed
local_umask=022
# This is just a message, not that important
dirmessage_enable=YES
# Yep, need the logs of uploads and downloads
xferlog_enable=YES
# Keeping default of RHEL3
connect_from_port_20=YES
# I want more detailed logs about who logs in for example
dual_log_enable=yes
# keeping default
xferlog_std_format=YES
# My custom message
ftpd_banner=Welcome to my FTP service.
# All local users are chrooted in their home, except the ones listed in the chroot_list
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
# Using pam as well
pam_service_name=vsftpd
# Using a user_list which explicitely names the users who are allowed
userlist_enable=YES
userlist_deny=NO
userlist_file=/etc/vsftpd/user_list
# Defining a user-specific config directory. Needed for restricting ftp commands to one specific user.
user_config_dir=/etc/vsftpd/user_conf
# default values of RHEL3
listen=YES
tcp_wrappers=YES