0

I tried hard but not able to give access of web directory to other user for FTP. Below are the directories which are under directory /var/www/html

1) nice_call
2) poor_call
3) great_call

/var/www/html is owned by apache user as well as all above mentioned directories is also owned by apache.

I just want to give read+write access to one more user named as ftp_user for directory poor_call not for other directories. I am also ready to give 777 access to directory poor_call to resolve this issue.

Please note that I am having root access to execute any command to resolve this issue.
It will be great if someone can help on it.parent-directory

1

Set up your user ftp_user so that they can FTP successfully into their home directory. Assuming you're using vsftp as your FTP server; you'll need the following as a minimum in your /etc/vsftpd.conf:

anonymous_enable=NO
local_enable=YES
write_enable=YES

Within the user's home directory create a directory called (eg) poor_call.

Then, bind mount /var/www/poor_call onto this newly created directory:

# mount --bind /var/www/poor_call /home/ftp_user/poor_call

After running the above command, /var/www/poor_call becomes accessible from /home/ftp_user/poor_call.

Once you've confirmed that it works, add the following to your /etc/fstab to make the bind mount permanent over reboots:

/var/www/poor_call /home/ftp_user/poor_call none bind 0 0
  • Thanks its working fine and exactly the same which i was looking for. – prashant thakre Sep 9 '14 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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