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 am a novice with Linux, I am trying to install a LAMP server for local testing, no external (public) access will be available to this server.

I have everything setup, what I would like to accomplish is when a specific user logs into the ftp, he should end up in the var/www/html directory by default with enough permissions to upload/change/delete anything in that folder.

I have the user setup, proftpd installed. How can I set up the proftpd.conf file to do this? And what permissions do I need to set on the apache home directory so I can make changes? I have no concern of security, this is for my internal network use only.

Thanks

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Examine the /etc/proftpd/proftpd.conf file and set the DefaultRoot directive

DefaultRoot  /var/www/html

this will chroot you user to the /var/www/html tree.

Add the user to the group that owns the files in /var/www/html e.g. apache

usermod -a -G apache user

Then add write permission for group in /var/www/html

chmod -R g+w /var/www/html
share|improve this answer
    
I now get the following: Command: MLSD Response: 550 /: Permission denied Error: Failed to retrieve directory listing –  Charlie Brown Mar 7 '11 at 18:46
    
I turned off SE Linux and that seemed to do the trick. Thanks –  Charlie Brown Mar 7 '11 at 18:54
add comment

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.