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

I have successfully installed the vsftpd. and it is live. but i get following error:

Response: 500 OOPS: cannot change directory:/home/sovit

what i want to do is direct all local users of the system to the /var/www folder instead of their home root below is vsftpd conf file

http://pastie.org/2284176

any help would be appreciated. thank you

share|improve this question

3 Answers 3

This could be caused by SElinux run

/usr/sbin/setsebool -P ftp_home_dir 1

You may need to restart the vsftpd service after doing this.

share|improve this answer
    
I get no such file or directory after i hit that command. –  Yalamber Jul 28 '11 at 12:02
    
@askkirati: Well, it might help if you told us what distro/OS you are using. Also tell us what the output of getenforce is. –  Iain Jul 28 '11 at 12:06
    
@lian i am using ubuntu –  Yalamber Jul 28 '11 at 15:29
    
I see disabled msg –  Yalamber Jul 28 '11 at 15:30
    
@askkirati: I have only ever seen that message when SElinux is on. –  Iain Jul 28 '11 at 15:56
  • Define an unprivileged user with nopriv_user, assuming is ftpsecure
  • Change GID of all the ftp users to the same with ftpsecure
  • Change the umask of webserver user and vsftpd to 002
  • chmod -R g+w /var/www

PS: As another way: you can change the $HOME folder of ftp user to the /var/www instead of setting local_root in vsftpd.conf.

share|improve this answer
    
let me try this –  Yalamber Jul 29 '11 at 3:19
up vote 0 down vote accepted

I figured out there was no directory created for user in home directory. I created it and set the local root to /var/www and it worked

share|improve this answer

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.