0

Suppose I have the following directories inside my www folder:

private_info_1
public_info_1
private_info_2
public_info_2

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

Nate
  • 449
  • 6
  • 11
  • 24

1 Answers1

1

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.

Chris Nava
  • 1,147
  • 1
  • 7
  • 9