Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm configuring an Apache server under CentOS 6.3. I want to put my app in


But that directory is owned by root. How can I properly configure the access so I can publish files to that directory from a FTP client?

Initially I wanted to put my files under /home/myApp/wwwroot but that gives error messages as it seems under CentOS you're supposed to put your files under /var/www/html

What would be the right way of configuring this?

share|improve this question
/home/myApp/wwwroot is perfectly valid. What is the error? – phil-lavin Mar 25 '13 at 13:30
Probably you have to configure SELinux in order to put your files in /home/myApp/wwwroot. – jhcaiced Mar 25 '13 at 13:42
up vote 1 down vote accepted

My suggestion is:

  • Create the /var/www/html/YOUR_SITE directory, and own to your ftp user
  • Make sure /var/www/html/ have the 755 permission;
  • Create one user(please, dont use the ftp system user already created) and give the "ftpshell" to him. The home directory shall be /var/www/html/YOUR_SITE;
  • Configure your favorite ftp daemon(mine is vsftpd) to chroot by default to the home folder. Read the docs ;)

Done. When you connect through ftp, it will seems to be that you are at /, and your user will not navigate on the entire filesystem hierarchy.

share|improve this answer

Your Answer


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.