1

I have vsftpd running on Ubuntu 16.04 LTS.

During installation a ftp user is created with a home directory of /srv/ftp and hence this is the default FTP directory.

Here are my vsftpd.conf file permissions that I've set.

listen_ipv6=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_umask=011
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
allow_writeable_chroot=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd

What I'm trying to do is upload files as an anonymous user to the ftp server. I am able to login as an anonymous user but when I'm trying to upload, I'm getting,

200 PORT command successful. Consider using PASV.
553 Could not create file.

Now there are numerous sources on the internet who are getting the same error but none of the solutions are solving my error. I know there is something about the permissions that I'm missing.

The /srv/ftp permissions are set to 755.

  • "... are getting the same error but none of the solutions are solving my error". Do you expect someone here to go through all of those options again? From How to ask a good question - Sharing your research helps everyone. Tell us what you found and why it didn’t meet your needs... – Stephen Rauch Feb 19 '17 at 15:14
1

I have installed vsftpd, filezilla, went through your .conf and added options accordingly:

$ sudo cat /etc/vsftpd/vsftpd.conf | grep -v "#"
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=abdullah
xferlog_std_format=YES
chroot_local_user=YES
listen=NO
listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

filezilla did give some feedback and I had to change the option chown_username=abdullah with my existing user name.

then I run into permission problem, which is solved by changing the ownership of the ftp folder /var/ftp/pub from root to ftp. Then, I was able to upload & bind the files but not modify them, since we have a umask option.

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.