I'm creating an ftp server with vsftpd, and I've almost finished, the only thing remaining is when I upload a file (logged as an user U), the file belongs to a group which has the same name (so group name = U), but the user is in a different group.
Let's give an example:
user=publichttp
usergroup=ftpusers (and only 1 group)
When I upload a file, the file is uploaded with 775 permissions as I want, but a ls -l show me the file owner is publichttp:publichttp and not publichttp:ftpusers as it should be and as I want.
the folder permissions in /home/:
drwxrwxr-x 3 publichttp ftpusers 4096 nov. 8 17:20 publichttp
in /home/publichttp/:
-rwxrwxr-x 1 publichttp publichttp 98789 nov. 8 17:20 Extras.Txt
(I want)
-rwxrwxr-x 1 publichttp ftpusers 98789 nov. 8 17:20 Extras.Txt
I don't know how to do that, searched all the day...
vsftpd.conf:
listen=YES
connect_from_port_20=YES
use_localtime=YES
xferlog_enable=YES
dirmessage_enable=YES
ftpd_banner=myftp.
anonymous_enable=NO
local_enable=YES
write_enable=YES
nopriv_user=publichttp
secure_chroot_dir=/var/run/vsftpd/empty
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list #empty file
allow_writeable_chroot=YES
userlist_enable=YES
userlist_deny=NO
userlist_file=/etc/vsftpd.user_list #just contains publichttp
anon_upload_enable=YES
anon_mkdir_write_enable=YES
local_umask=002
file_open_mode=0777
Is it possible ? (the simplest solution is the best)
Thanks !
id publichttp
says? – user140866 Nov 8 '15 at 17:32