Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I recently installed VSFTPD and added a user with the following commands:

useradd -G ftpusers -d /var/www someuser
passwd someuser

I also added someuser to user_list and confirmed that it does not exist in ftpusers. When I try to log in using FireFTP I get a 530 Permission Denied error. vsftpd.conf has been set to anonymous_enable=NO but when it was set to YES, I was able to successfully log in anonymously.

Am I missing something? Should I be setting ownership of /var/www or something else?

EDIT: I've tried taking root off of ftpusers but even when attempting to sign in with root I get a permission denied error. This would lead me to believe there's something wrong with my vsftpd or server configuration and not the way the user is set up.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

I set up an FTP server in Ubuntu using something like this guide and mine works well:

http://cviorel.easyblog.ro/2009/03/05/how-to-setup-vsftpd-ftp-on-ubuntu-linux

Does anything here help?

On another note, you should not change the owner of /var/www. As long as your group ftpusers has access to to it and vsftpd is running as a user that is a member of the group you should be fine.

share|improve this answer
    
Ah-hah! Got it! At the end of that article it indicated that I needed to reset the vsftpd service using: /etc/init.d/vsftpd restart Thanks so much! This has taken me forever to figure out. –  Nick Mar 31 '11 at 18:37
    
No problem, glad I could help. –  tjameson Mar 31 '11 at 18:39

someuser requires read (and presumably write) access to /var/www

Which permissions does it currently have?

To see permissions, type ls -l /var at the command prompt and look at the left hand columns of the file listing. This gives you your file permissions and the user and group that owns the directories/files.

Read this first if you are at all unsure: Understanding Linux File Permissions

share|improve this answer
    
Noob question - how do I check/set permissions? –  Nick Mar 31 '11 at 8:52
    
I've added some more information to the answer. Hope that helps. –  Steve Mayne Mar 31 '11 at 9:55
    
Thanks. root is the user and group that owns the directories/files. Do I need to be logged in as the user I want to check permissions for? Either way, whether I'm logged in as root or someuser, permissions show that read and write access are available. I don't think that's the issue as I'm able to access that directory as someuser via ssh. Using FTP is a different story. –  Nick Mar 31 '11 at 10:07
    
Correction - root has full access while someuser has read and execute access. No write access. Would this prevent me from logging in via ftp? –  Nick Mar 31 '11 at 10:31
    
Shouldn't do - unless your FTP client is attempting to upload something as part of its login routine (unlikely). If you can access the folder as someuser over ssh, then it should be fine. –  Steve Mayne Mar 31 '11 at 12:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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