Guide: Multi-user Unix Permissions and Data Access Control
Tips on how to manage permissions and data access control.
Allowing users' Linux accounts to access CryoSPARC files
root@host:~# useradd cryosparc
root@host:~# useradd alice
root@host:~# useradd tomroot@host:~# usermod -aG cryosparc alice
root@host:~# usermod -aG cryosparc tomroot@host:~# mkdir -p /data/cryosp_projs
root@host:~# chown cryosparc:cryosparc /data/cryosp_projs
root@host:~# chmod g+ws /data/cryosp_projs/# the cryosparc user creates a bunch of files
root@host:~# su cryosparc
cryosparc@host:/root$ touch /data/cryosp_projs/file1
cryosparc@host:/root$ touch /data/cryosp_projs/file2
cryosparc@host:/root$ touch /data/cryosp_projs/file3
cryosparc@host:/root$ ls -l /data/cryosp_projs/
total 0
-rw-rw-r-- 1 cryosparc cryosparc 0 Jun 18 17:05 file1
-rw-rw-r-- 1 cryosparc cryosparc 0 Jun 18 17:05 file2
-rw-rw-r-- 1 cryosparc cryosparc 0 Jun 18 17:05 file3
cryosparc@host:/root$ exit
# alice logs in, and also creates a file in that directory
root@host:~# su alice
alice@host:/root$ touch /data/cryosp_projs/file4
alice@host:/root$ ls -l /data/cryosp_projs/
total 0
-rw-rw-r-- 1 cryosparc cryosparc 0 Jun 18 17:05 file1
-rw-rw-r-- 1 cryosparc cryosparc 0 Jun 18 17:05 file2
-rw-rw-r-- 1 cryosparc cryosparc 0 Jun 18 17:05 file3
-rw-rw-r-- 1 alice cryosparc 0 Jun 18 17:06 file4
alice@host:/root$ exit
# notice how the file alice made is owned by the cryosparc group.
#
# now tom can log in and is able to modify the files created by...
# ... both alice and cyosparc
root@host:~# su tom
tom@host:/root$ rm /data/cryosp_projs/file2
tom@host:/root$ rm /data/cryosp_projs/file4
tom@host:/root$ ls -l /data/cryosp_projs/
total 0
-rw-rw-r-- 1 cryosparc cryosparc 0 Jun 18 17:05 file1
-rw-rw-r-- 1 cryosparc cryosparc 0 Jun 18 17:05 file3
tom@host:/root$ touch /data/cryosp_projs/file
tom@host:/root$ ls /data/cryosp_projs/ -l
total 0
-rw-rw-r-- 1 tom cryosparc 0 Jun 18 17:07 file
-rw-rw-r-- 1 cryosparc cryosparc 0 Jun 18 17:05 file1
-rw-rw-r-- 1 cryosparc cryosparc 0 Jun 18 17:05 file3Establishing teams of users, and limiting access to data owned by another team
Last updated