I have a folder public_html with several subfolders on Ubuntu 12.04 server.

Is it possible to add different permissions on individual subfolders for two new individual users without changing the group ownership of the folders or interfering with apache permissions? If so, how?

I would like to add two new users but restrict their write permissions to specific subfolders Each user would have access to different folders e.g. user1 should be able to write to public-html/folder1 and user2 should be able to write to:

public_html/folder2 and 

If this can be done in ftp permissions separately (proftpd) that would also be an option.

ls -al in the home folder of the user which owns public_html gives me :

drwxrwxr-x 27 user1 user1 4096 Feb 12 16:54 public_html

all subfolders i'm interested in changing the permissions for have the permissions:

drwxrwsr-x  2 user1 user1  4096 Nov 22 12:52 views

usernames have been changed to protect the innocent. This server was not set up by myself and I have a feeling permissions are far too permissive.

  • ACLs are enabled by default on Ubuntu 12.04 (I forget when Linux started to have them on by default, but it's been a few years). You may need to install the acl package to have the shell tools, but you no longer need a mount option. Feb 12, 2014 at 23:10

1 Answer 1


Maybe I misunderstand the problem but what you ask can trivially be done by making these users the owner of the new directories (without changing the group).

  • If I change the owner won't I affect other users' access? Users with permissions on the whole public_html directory should still be able to, and already can, access folder2 and folder3. Also, the new users can't both own folder2 can they?
    – codecowboy
    Feb 12, 2014 at 18:06
  • 1
    @codecowboy That depends on your configuration. It makes little sense to think about that without you giving us the precise configuration (access rights) for the already existing directories and the users and groups they belong to. Feb 12, 2014 at 18:25
  • I've updated the question with more precise info
    – codecowboy
    Feb 14, 2014 at 8:52
  • @codecowboy That doesn't change my answer. Unless user1 shall not be capable of writing to folder2. In that case either the group of folder2 would have to be changed or the group rights. Feb 14, 2014 at 9:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .