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

link|improve this question
feedback

3 Answers

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.

link|improve this answer
I get no such file or directory after i hit that command. – askkirati 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 – askkirati Jul 28 '11 at 15:29
I see disabled msg – askkirati 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
feedback
  • 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.

link|improve this answer
let me try this – askkirati Jul 29 '11 at 3:19
feedback
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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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