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'm trying to get ftp running locally to update a drupal install. I just need the FTP user to have full access to a directory and all subdirectories.

I have done /usr/sbin/setsebool -P ftp_home_dir 1 and then restarted vsftpd

I have chowned all files as user:user

I have chmod 777'ed (I'll change it back) the folder and subfolders

I still cannot modify files in /var/www while I can modify things in /home/user.

here's my vsftpd.conf:

local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
xferlog_std_format=YES
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

I've tried mounting the directory with mount --bind into the home directory. I've also tried changing the root directory to /var/www - neither worked. Is there anything else I'm missing?

share|improve this question
    
If you disable selinux (setenforce 0) does it work ? –  Iain Jun 17 '13 at 17:50

1 Answer 1

You should clarify how you're setting things up. Are you setting /var/www as home dir for your user, and then trying to enable ftp rw to that dir? If this is the case, is the dir's SELinux context right? To enable writing it should be public_content_rw_t. Anyway, if you don't provide further information about your configuration it'll be difficult to try to help you.

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.