• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

folder access question

Red Squirrel

No Lifer
Lets say I have user1 and user2. I want to make a folder that user1 can write to, user2 can read but nobody else can read. What I tried, but failed at was this

-chmod the folder 770
-Make user1 and group1 the owner
-put user2 in group1.

But still, anyone else can read it too.

Linux user/groups have always confused me, they're not as straightforward as NTFS permissions are.
 
OK, here you go:

Set "user1" to be the owner.
Set private group "user2" to be the "group" for this folder.
chmod 750 the folder (Owner has full access, group has read and execute, others have nothing).

Test this works as intended. To be honest, I think that even though it means you have to learn another style of permissions, this style is far superior.
 
Actually realized the user has to log out and back in for it to take effect, what I did was working as well after having done that. Well they both had write but yeah 750 is what I really wanted.
 
Sweet, glad it all works for ya. The only reason I suggested making the group user2, is that user1 is a private group normally, so that is just my preference. Either way works though, as you have shown. Also, if the numeric security confuses you, I think you can use chmod like this (note, I could be wrong, I use octal values, not this other way):

chmod u=rwx,g=rx,o=

This should give the owner read, write and execute, group read and execute, and others nothing.
 
Back
Top