Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to make different users at my server(say 22.23.34.*) and set each user's permissions to their particular directory only. Lets say my server is having three directories Directory A, B, C

=> Now root user should be able to access all the directories. He can update , delete etc in all directories.

=> now let's say I make another user "A". Now I want that "A" can do anything only in his own directory but can only other user's directories. He should be able to perform CRUD operations in Directory "A" only to which he is allocated to.

What will be the commands used to create such schema ? Any idea ?

share|improve this question

migrated from stackoverflow.com Mar 6 '13 at 10:13

This question came from our site for professional and enthusiast programmers.

    
Which distro are you using? –  Ifthikhan Mar 6 '13 at 8:29

1 Answer 1

Simply create the user by the syntax:

useradd [options] username

e.g., useradd aruz

To allow users to see each others' home directories, do

chmod 755 /home/userA

... or whatever home directory paths look like on your system.

To prevent users from being able to see each others' home directories, do

chmod 700 /home/userA

And for good measure, you could do

chown userA /home/userA

but that will almost certainly be set that way by default.

If your system has ACLs, you can use them to implement finer-grained access control.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.