vsftpd, "550, permission denied" while upload

Issues related to applications and software problems

vsftpd, "550, permission denied" while upload

Postby mariodeng » 2012/02/23 10:15:26

Hello everyone,

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

My vsftpd.conf looks like this:

Code: Select all
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


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

Code: Select all
dirlist_enable=YES
download_enable=YES
local_root=/var/ftp/virtual_users/ftpi
write_enable=YES


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: Select all
drwxr-xr-x. 2 ftpi ftpi 4.0K Feb 23 00:21 ftpi


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: Select all
ftpi:x:504:505:ras mirror:/var/ftp/virtual_users/ftpi:/sbin/nologin


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


Cheers,
Mario
mariodeng
 
Posts: 4
Joined: 2012/02/23 09:54:56

vsftpd, "550, permission denied" while upload

Postby pschaff » 2012/02/23 16:21:17

It is not obvious to me where you are going wrong, but have you read Chroot vsftpd with non-system users and/or Using Virtual Accounts with VSFTPD (Very Secure FTP server) and MySQL on CentOS 5?
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

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

Postby mariodeng » 2012/02/24 09:10:59

Yeah,

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

I just can't write :-(
mariodeng
 
Posts: 4
Joined: 2012/02/23 09:54:56

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

Postby r_hartman » 2012/02/24 10:48:44

Haven't done vsftpd this way, but this is from the man page:
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.

Your vsftpd.conf says:
guest_username=ftp

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?
r_hartman
 
Posts: 701
Joined: 2009/03/23 15:08:11
Location: Netherlands

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

Postby mariodeng » 2012/02/24 12:51:36

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.
mariodeng
 
Posts: 4
Joined: 2012/02/23 09:54:56

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

Postby mariodeng » 2012/02/25 14:39:29

Now I switched to local users, this works fine.
mariodeng
 
Posts: 4
Joined: 2012/02/23 09:54:56

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

Postby bkamen » 2012/05/07 17:59:20

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
bkamen
 
Posts: 15
Joined: 2009/12/06 20:48:46
Location: Central Illinois, USA

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

Postby pschaff » 2012/05/07 18:04:59

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 mariodeng has not even logged on in months.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

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

Postby bkamen » 2012/05/07 18:06:39

pschaff wrote:
have you read Chroot vsftpd with non-system users ?


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.
bkamen
 
Posts: 15
Joined: 2009/12/06 20:48:46
Location: Central Illinois, USA

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

Postby pschaff » 2012/05/07 18:09:20

Please start a fresh thread. This one is now locked.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Next

Return to CentOS 6 - Software Support

Who is online

Users browsing this forum: No registered users and 5 guests