Data sharing between users

Access rights to user data are managed by the Linux system. Documentation on file management under Linux is extensive and easily available online.

Mesocentre users have a primary group by default (the one used when creating files or directories); they also belong to the group(s) of the project(s) they take part in.

The id command displays the user’s uid (their login), their gid (their primary group), and all the groups (primary and secondary) the user belongs to.

[hflorin@login01 ~] > id
uid=3528(hflorin) gid=17234(hflorin) groups=17234(hflorin), 2297(a371),11445(b001) 

In this example, user hflorin has hflorin as primary group. They also belong to groups a371 and b001.

Occasional sharing

If users of the same project only need to share data occasionally, the chgrp command can be used.

[hflorin@login01 ~] > cd /scratch/hflorin/ 
[hflorin@login01 hflorin] > touch datab001
[hflorin@login01 hflorin] > ls -l
-rw-rw-r--  1 hflorin hflorin            0 Jun  2 11:37 datab001
[hflorin@login01 hflorin] > chgrp b001 datab001 
[hflorin @login01 hflorin] > ls -l
-rw-rw-r--  1 hflorin b001                0 Jun  2 11:37 datab001 

In this example, hflorin creates a file named /scratch/hflorin/datab001 and shares it with the other members of project b001.

Warning: to access the file datab001, the other users of project b001 must also have permission to traverse the directory tree from /scratch. The hflorin directory must therefore itself belong to group b001 with execute (x) permission for the group, or execute permission must be granted to others. The chmod command changes the access permissions of a file or directory.

Regular sharing

If users of the same project need to share data on a regular basis, the simplest approach is to make the project group the primary group of all these users.

To change their primary group, the user or the project leader can send a request by email to mesocentre-techn@univ-amu.fr. It is then up to the users to fine-tune file and directory access permissions with the chmod command.

Scroll to Top