Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Suppose I have the following directories inside my www folder:


Is it possible to create an FTP user (I'm using cPanel) that could access the two public directories, but not the private directories?

share|improve this question
up vote 1 down vote accepted

There are two common ways of doing this. The preferred method requires more access than you are likely to have via cPanel and is called "FTP jail". The second (simpler method) is to set the permissions of the private folders to deny access. Most commonly this is done by setting the permissions of the private folders to 750 or 770 and the folder's group to one that the user is not a member.

sudo chmod 750 private_info_1 private_info_2
sudo chgrp {private group} private_info_1 private_info_2

If the private info folders will only ever be accessed by a single user use chmod 700 to deny everyone else.

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.