# ls -al /data/clients
drwxr-xr-x 218 clients      clients 12288 Sep 25 04:11 .
drwxr-xr-x   9 root         root     4096 Sep 24 17:15 ..
drwxrwxr-x   5 clients      clients  4096 Sep 17 10:33 cmd2445
drwxr-x---   4 clients      clients  4096 Sep 24 09:33 test6089

# ls -al /data/clients/test6089
drwxr-x---   4 clients clients  4096 Sep 24 09:33 .
drwxr-xr-x 218 clients clients 12288 Sep 25 04:11 ..
drwxr-xr-x   5 clients apache   4096 Sep 23 16:14 blog
-rw-r--r--   1 clients apache      0 Sep 15 12:26 favicon.ico
-rw-r-----   1 clients apache     67 May 14 09:49 robots.txt
drwxr-x---   6 clients apache   4096 May 14 09:49 userfiles


# touch test.txt
# ftp localhost
Connected to localhost.
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (localhost:root): test6089
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (127,0,0,1,179,168)
150 Here comes the directory listing.
226 Transfer done (but failed to open directory).
ftp> put test.txt
local: test.txt remote: test.txt
227 Entering Passive Mode (127,0,0,1,123,219)
553 Could not create file.


Oddly I could login a few hours ago and list the directory (though still
could not upload. The behavior seems to be erratic. Not sure whats going
on here...

# cat vsftpd.conf | egrep -v "(^#.*|^$)"
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/xferlog
xferlog_std_format=NO
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
log_ftp_protocol=YES
guest_username=clients
anonymous_enable=NO
virtual_use_local_privs=YES
guest_enable=YES
user_sub_token=$USER
local_root=/data/clients/$USER
chroot_local_user=YES
hide_ids=YES


Thanks for any help. I'm at the end of my rope on this one.
-Nick




On Fri, 2009-09-25 at 07:37 +0100, Alasdair Gow wrote:
> Are you running SElinux?
> What are the file permissions in the home directories?
> 
> Cheers
> Ally
> 
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] 
> On Behalf Of Nick Jennings
> Sent: 25 September 2009 00:05
> To: [email protected]
> Subject: [rhelv5-list] vsftpd setup with virtual users & homedirs.
> 
> Hello All,
> 
>  I've been trying to setup vsftpd with virtual users, each with their own 
> homedir. I've been at it all day, having lots of setbacks.
> Ironically, getting the authentication done was a piece of cake, where I'm 
> getting the real trouble when I've logged in. I can list files but can't 
> write or make directories.
> 
> 
>  The ftp user I've setup is named 'clients', homedir is /data/clients.
> 
> Here's my conf at the moment:
> 
> local_enable=YES
> write_enable=YES
> local_umask=022
> dirmessage_enable=YES
> xferlog_enable=YES
> connect_from_port_20=YES
> xferlog_file=/var/log/xferlog
> xferlog_std_format=NO
> listen=YES
> pam_service_name=vsftpd
> userlist_enable=YES
> tcp_wrappers=YES
> log_ftp_protocol=YES
> anonymous_enable=NO
> virtual_use_local_privs=YES
> guest_enable=YES
> user_sub_token=$USER
> local_root=/data/clients/$USER
> chroot_local_user=YES
> hide_ids=YES
> 
> 
> With this conf I can login, list the directories, etc. However cannot upload 
> or make any new directories.
> 
> If I enable any of these two options:
> 
> 
> guest_username=clients
> nopriv_user=clients
> 
> 
> I am unable to login, getting the error:
> 
> 
> 500 OOPS: cannot change directory:/data/clients/testuser Login failed.
> 
> 
> Everything is owned clients:clients.
> 
> 
> Can anyone help me out here? I've been banging my head against the wall all 
> day and am out of steam. Also, I can't figure out how to get any /useful/ 
> information from vsftpd to help debug the problem.
> 
> Thanks,
> Nick
> 
> 
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.409 / Virus Database: 270.13.112/2392 - Release Date: 09/24/09 
> 05:52:00
> 
> --
> 
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error please notify the sender. Any
> offers or quotation of service are subject to formal specification.
> Errors and omissions excepted.  Please note that any views or opinions
> presented in this email are solely those of the author and do not
> necessarily represent those of Lumison.
> Finally, the recipient should check this email and any attachments for the
> presence of viruses.  Lumison accept no liability for any
> damage caused by any virus transmitted by this email.
> 
> _______________________________________________
> rhelv5-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/rhelv5-list

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to