There are two general approaches. The first is using traditional user groups and permissions. This often sufficient for this sort of thing, but it is sometimes not fine-grained enough. The second approach is to use ACLs (access control lists) which give more flexibility.
With groups and ownership, you might approach it like this:
- Change the owner of the directory to user1:
Code:
# chown user1 /work/...
- Change the permissions of the directory to 755 (rwxr-xr-x)
Code:
# chmod 755 /work/...
user1's umask should be set so that new files created by user1 will be readable by all users on the system. To check if this is OK, you can just ty it. If if doesn't work, you should edit user's shell init file (probably ~/.bashrc) and add the line: