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.

Let's say I have an FTP user that I have given access to public_html, but I don't want them to have access to a certain folder within public_html. Is there a way to block their access from this certain folder, but let them have access to everything else?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You could change the owner and group of the sub folder, then chmod the "other" permissions to 0

EDIT:

To answer your comment. Say I have user A who you want to have access to folder A but not Folder B under it

 drwxr-xr--    UserA UserA FolderA

Under folderA is folder B

 drwxr-xr-x    UserA UserA FolderB

So drwxr-xr-x is read as "It's a directory" The owner (UserA) has RWX the group (UserA) has RX and everyone else (other) has RX

The last part tells you that if the person is not UserA and not in the UserA group they still have R to the folder.

If you changed the permissions to look like this:

 drwxr-wr--     UserA UserA FolderA

User A still has everything they need for accessing that folder.

 drwxr-x---     UserB UserB FolderB

Now User A cannot access FolderB. you would accomplish this by :

 chown UserB:UserB FolderB
 chmod 750 FolderB

The 750 Says Owner has RWX, Group has RX and Everyone else (other) has no rights to this folder.

share|improve this answer
    
The owner and group are already set to the main ftp user. What do you mean by chmod the "other" permissions. –  James Simpson Jul 22 '09 at 20:05
    
Please see my edit. better formatting –  Zypher Jul 22 '09 at 20:24

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.