0

I've created a user jdoe and I wanted to map such a user to apache user. So everytime that I upload a file could be owned by apache.

This is my /etc/vsftpd/vsftpd.conf file:

listen=YES
listen_ipv6=no
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
ascii_upload_enable=YES
ascii_download_enable=YES
chroot_local_user=YES
chroot_list_enable=YES
ls_recurse_enable=YES
pam_service_name=vsftpd
rsa_cert_file=/etc/vsftpd/www.example.com/fullchain1.pem
rsa_private_key_file= /etc/vsftpd/www.example.com/privkey1.pem
pasv_enable=Yes
pasv_min_port=1030
pasv_max_port=1035
ssl_enable=yes
debug_ssl=yes
force_local_logins_ssl=YES
force_local_data_ssl=YES
allow_anon_ssl=no
ssl_ciphers=HIGH
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
allow_writeable_chroot=YES
guest_enable=YES
chmod_enable=YES
chown_uploads=YES
chown_username=apache
guest_username=apache
hide_ids=YES
user_config_dir=/etc/vsftpd

And I have in /etc/vsftpd/jdoe :

local_root=/var/www

But when I upload o create a file I get:

550 Permission denied

(on Filezilla)

Am I doing something wrong? Is what I'm looking for feasible?

0

Finally I've found a way:

listen=YES
listen_ipv6=no
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
log_ftp_protocol=YES
connect_from_port_20=YES
ascii_upload_enable=YES
ascii_download_enable=YES
chroot_local_user=YES
chroot_list_enable=YES
ls_recurse_enable=YES
pam_service_name=vsftpd
rsa_cert_file=/etc/vsftpd/www.example.com.ar/fullchain1.pem
rsa_private_key_file= /etc/vsftpd/www.example.com.ar/privkey1.pem
pasv_enable=Yes
pasv_min_port=1030
pasv_max_port=1035
ssl_enable=yes
debug_ssl=yes
force_local_logins_ssl=YES
force_local_data_ssl=YES
allow_anon_ssl=no
ssl_ciphers=HIGH
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
pasv_address=192.168.222.11
guest_enable=YES
chown_uploads=YES
chown_username=apache
guest_username=apache
hide_ids=YES
user_config_dir=/etc/vsftpd
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
anon_umask=0002

And also:

in /etc/vsftpd/jdoe:

local_root=/var/www/www_example_com_ar

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.