Page 1 of 2

vsftpd, "550, permission denied" while upload

Posted: 2012/02/23 10:15:26
by mariodeng
Hello everyone,

I am trying to setup a FTP server. For this I installed vsftpd.

My vsftpd.conf looks like this:

[code]
anon_world_readable_only=NO
anonymous_enable=YES
chroot_local_user=YES
guest_enable=YES
guest_username=ftp
hide_ids=NO
listen=YES
local_enable=YES
max_clients=100
max_per_ip=2
nopriv_user=ftp
pam_service_name=ftp
pasv_max_port=65535
pasv_min_port=64000
session_support=NO
use_localtime=YES
user_config_dir=/etc/vsftpd/users
xferlog_enable=YES
async_abor_enable=YES
connect_from_port_20=YES
dirlist_enable=YES
download_enable=YES
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=NO
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
rsa_cert_file=/etc/pki/tls/certs/vsftpd.pem
[/code]

The config File for my only, located under: /etc/vsftpd/users looks like:

[code]dirlist_enable=YES
download_enable=YES
local_root=/var/ftp/virtual_users/ftpi
write_enable=YES[/code]

Also I am sure that die .pem file exists. The directory of the virtual user is: /var/ftp/virtual_users/ftpi/, while the permissions look like:

[code]drwxr-xr-x. 2 ftpi ftpi 4.0K Feb 23 00:21 ftpi[/code]

And the user has "x" rights for the upper dirs.

But when try to upload a file (as user ftpi), I get "550 permission denied". I already checked selinux and iptables, everything fine (doesn't even work when I shut these services down).

And, at least, the passwd entry for the user ftpi

[code]ftpi:x:504:505:ras mirror:/var/ftp/virtual_users/ftpi:/sbin/nologin[/code]

I can't figure out where the permission problem is coming from, may you have an idea?


Cheers,
Mario

vsftpd, "550, permission denied" while upload

Posted: 2012/02/23 16:21:17
by pschaff
It is not obvious to me where you are going wrong, but have you read [url=http://wiki.centos.org/HowTos/Chroot_Vsftpd_with_non-system_users]Chroot vsftpd with non-system users[/url] and/or [url=http://wiki.centos.org/HowTos/VirtualVsFtpd]Using Virtual Accounts with VSFTPD (Very Secure FTP server) and MySQL on CentOS 5[/url]?

Re: vsftpd, "550, permission denied" while upload

Posted: 2012/02/24 09:10:59
by mariodeng
Yeah,

I did it exactly the way mentioned in the first tutorial. Also tried the scripts.

I just can't write :-(

Re: vsftpd, "550, permission denied" while upload

Posted: 2012/02/24 10:48:44
by r_hartman
Haven't done vsftpd this way, but this is from the man page:
[quote]guest_username
See the boolean setting guest_enable for a description of what constitutes a guest login. This setting is the real username which guest users are mapped to.[/quote]
Your vsftpd.conf says:
[quote]guest_username=ftp[/quote]
Is the real user used ftp, which then would have read access only?
What happens if you set the mode of /var/ftp/virtual_users/ftpi to 777, just for test, or change the owner of that dir to ftp?

Re: vsftpd, "550, permission denied" while upload

Posted: 2012/02/24 12:51:36
by mariodeng
chmod 777 /var/ftp/virtual_users/ did not help.

With the ANONYMOUS user everything is fine. Can join the server, download files and no permission to upload.

But with the virtual user I can't upload. No matter what I change with the permissions.

Re: vsftpd, "550, permission denied" while upload

Posted: 2012/02/25 14:39:29
by mariodeng
Now I switched to local users, this works fine.

Re: vsftpd, "550, permission denied" while upload

Posted: 2012/05/07 17:59:20
by bkamen
So are you saying you gave up on virtual users or ??

I'm trying to get vsftpd working and the write part is the only thing that's still not working.

Same error - 550 Permission Denied

-Ben

Re: vsftpd, "550, permission denied" while upload

Posted: 2012/05/07 18:04:59
by pschaff
Please review the recommended reading and do not hijack threads. Start your own thread to have the best chance of getting the help you need. Having your post hidden in an old thread is a sure way to get it ignored by the majority of forum users, and [b]mariodeng[/b] has not even logged on in months.

Re: vsftpd, "550, permission denied" while upload

Posted: 2012/05/07 18:06:39
by bkamen
[quote]
pschaff wrote:
have you read [url=http://wiki.centos.org/HowTos/Chroot_Vsftpd_with_non-system_users]Chroot vsftpd with non-system users[/url] ?[/quote]

what a weird wiki...

users that aren't part of the system but the author of that wiki hands out a script to add users that does:

/usr/sbin/useradd -d "${HOMEDIR}/$USERNAME" -s "/sbin/nologin" -c "$FULLNAME" $USERNAME


That seems like adding a real user to the system to me.

Re: vsftpd, "550, permission denied" while upload

Posted: 2012/05/07 18:09:20
by pschaff
Please start a fresh thread. This one is now locked.