File Permission in Research Space
A user with account name User1
is not able to access a directory
Dirct
in his research space Group1
. The following is the result of
the ls
command:
1 2 3 4 5 6 7 8 |
|
Q: How to make User1
able to access the directory Dirct
?
A: Since User2
is the owner of the directory, User2
can run a command
to change the group ownership:
1 |
|
Q: In order for all group users able to access files and directories in the research space, what should they do?
A: They should run the following commands:
-
Change the group ownership of all files and directories to the research group
Group1
:1
[UserID@dev-node ~]$ chgrp -R Group1 /mnt/research/Group1/ 2>/dev/null
-
Open the permissions of all files and directories to be readable (
r
) and writable (w
) to group users:1
[UserID@dev-node ~]$ chmod -R g+rw /mnt/research/Group1/ 2>/dev/null
-
Make all directories sticky to the group ownership for any file generated inside (turn on group sticky bits):
1
[UserID@dev-node ~]$ chmod g+s $(find /mnt/research/Group1/ -type d -user $USER 2>/dev/null)
-
Group users should not copy files to their research space with preserving the ownership, such as using command "
cp -p ...
".