Hi,<br>
<br>
I am trying to set up a secure ftp server but am having some problems please can someone help.<br>
<br>
I want to be able to log in as ftp1 and see a chrooted enviroment where
I can upload and download from but not delete, no mater how I change
the umask setting I still can delete.<br>
<br>
If I log on as ftp2 I get a different chrooted area with again no permmison to delete.<br>
<br>
The config I have is as follows<br>
<br>
VSFTPD___________________________________<br>
# Example config file /etc/vsftpd/vsftpd.conf<br>
#<br>
# The default compiled in settings are fairly paranoid. This sample file<br>
# loosens things up a bit, to make the ftp daemon more usable.<br>
# Please see vsftpd.conf.5 for all compiled in defaults.<br>
#<br>
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.<br>
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's<br>
# capabilities.<br>
#<br>
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).<br>
anonymous_enable=NO<br>
#<br>
# Uncomment this to allow local users to log in.<br>
local_enable=YES<br>
#<br>
# Uncomment this to enable any form of FTP write command.<br>
write_enable=YES<br>
#<br>
# Default umask for local users is 077. You may wish to change this to 022,<br>
# if your users expect that (022 is used by most other ftpd's)<br>
local_umask=022<br>
#cmds_allowed=PASV,RETR,QUIT,CD,BINARY,ASCII,BYE,G  ET,PUT,LCD,LS,MPUT,PWD,SIZE,TYPE I,NOOP,SYST,FEAT<br>
#<br>
# Uncomment this to allow the anonymous FTP user to upload files. This only<br>
# has an effect if the above global write enable is activated. Also, you will<br>
# obviously need to create a directory writable by the FTP user.<br>
#anon_upload_enable=YES<br>
#<br>
# Uncomment this if you want the anonymous FTP user to be able to create<br>
# new directories.<br>
#anon_mkdir_write_enable=YES<br>
#<br>
# Activate directory messages - messages given to remote users when they<br>
# go into a certain directory.<br>
dirmessage_enable=YES<br>
#<br>
# Activate logging of uploads/downloads.<br>
xferlog_enable=YES<br>
#<br>
# Make sure PORT transfer connections originate from port 20 (ftp-data).<br>
connect_from_port_20=YES<br>
#<br>
# If you want, you can arrange for uploaded anonymous files to be owned by<br>
# a different user. Note! Using "root" for uploaded files is not<br>
# recommended!<br>
chown_uploads=YES<br>
chown_username=ftp<br>
hide_file=.message<br>
userlist_deny=NO<br>
#<br>
# You may override where the log file goes if you like. The default is shown<br>
# below.<br>
#xferlog_file=/var/log/vsftpd.log<br>
#<br>
# If you want, you can have your log file in standard ftpd xferlog format<br>
xferlog_std_format=YES<br>
#<br>
# You may change the default value for timing out an idle session.<br>
idle_session_timeout=600<br>
#<br>
# You may change the default value for timing out a data connection.<br>
#data_connection_timeout=120<br>
#<br>
# It is recommended that you define on your system a unique user which the<br>
# ftp server can use as a totally isolated and unprivileged user.<br>
#nopriv_user=ftpsecure<br>
#<br>
# Enable this and the server will recognise asynchronous ABOR requests. Not<br>
# recommended for security (the code is non-trivial). Not enabling it,<br>
# however, may confuse older FTP clients.<br>
#async_abor_enable=YES<br>
#<br>
# By default the server will pretend to allow ASCII mode but in fact ignore<br>
# the request. Turn on the below options to have the server actually do ASCII<br>
# mangling on files when in ASCII mode.<br>
# Beware that turning on ascii_download_enable enables malicious remote parties<br>
# to consume your I/O resources, by issuing the command "SIZE /big/file" in<br>
# ASCII mode.<br>
# These ASCII options are split into upload and download because you may wish<br>
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),<br>
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be<br>
# on the client anyway..<br>
#<br>
# You may fully customise the login banner string:<br>
ftpd_banner=This is MYFTP.<br>
#<br>
# You may specify a file of disallowed anonymous e-mail addresses. Apparently<br>
# useful for combatting certain DoS attacks.<br>
#deny_email_enable=YES<br>
# (default follows)<br>
#banned_email_file=/etc/vsftpd.banned_emails<br>
#<br>
# You may specify an explicit list of local users to chroot() to their home<br>
# directory. If chroot_local_user is YES, then this list becomes a list of<br>
# users to NOT chroot().<br>
#chroot_list_enable=YES<br>
# (default follows)<br>
#chroot_list_file=/etc/vsftpd.chroot_list<br>
chroot_local_user=YES<br>
#<br>
# You may activate the "-R" option to the builtin ls. This is disabled by<br>
# default to avoid remote users being able to cause excessive I/O on large<br>
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume<br>
# the presence of the "-R" option, so there is a strong case for enabling it.<br>
#ls_recurse_enable=YES<br>
<br>
pam_service_name=vsftpd<br>
userlist_enable=YES<br>
#enable for standalone mode<br>
listen=YES<br>
tcp_wrappers=YES<br>
_________________________________________<br>
ftp's home dir is /ftp/ftp1<br>
ftp2's dir is /ftp/ftp2<br>
<br>
I am also using the vsftp.user_list<br>
to allow only ftp1 and ftp2<br>
<br>
permissions on /ftp/ftp1 and /ftp/ftp2 are <br>
drwxrwxrwx  2 ftp1 ftp1 4096 Jun 16 16:02 ftp1<br>
drwxrwxrwx  2 ftp2 ftp2 4096 Jun 16 16:02 ftp2<br>
<br>
I have tried using g+s and chaging the group to root<br>
I also tried setting vsftpd to chmod & umask on conf but it does not work either.<br>
<br>
Is there any other way of doing this??