|
|
[[_TOC_]]
|
|
|
## Sharing directories
|
|
|
|
|
|
When a group of user need to share directories/files (files from now on) on a server, they need first need to have a common group that we will call *project* in this example. Then they need to set the group and permission of those files according to the intended level of sharing (read/write/exec).
|
|
|
|
|
|
### Having a common group
|
|
|
|
|
|
If the group is not already setup, [ask DSI](https://ent.oca.eu) for it creation. You will be asked a list of member that can be adjusted later on.
|
|
|
|
|
|
To know the group information of a given user you can use the **id** command:
|
|
|
```
|
|
|
[alainm@zztop ~]$ id alainm
|
|
|
uid=34105(alainm) gid=401(sit) groups=401(sit),517(galilee),485(gspspec), 109(project)...
|
|
|
```
|
|
|
### Setting the user group
|
|
|
|
|
|
In the example above, user *alainm* has a group *sit* (**gid**) and is a member of groups *sit*, *galilee*, *project* and *gspspec*. In order to share conveniently files inside the group project, you need to have that as your group (not just be part of that group).
|
|
|
|
|
|
Either your group is already *project*:
|
|
|
```
|
|
|
[alainm@zztop ~]$ id alainm
|
|
|
uid=34105(alainm) gid=109(project) groups=401(sit),517(galilee),485(gspspec), 109(project)...
|
|
|
```
|
|
|
|
|
|
or you need to start a new shell with tha group through the **newgrp* command:
|
|
|
```
|
|
|
[alainm@zztop ~]$ id alainm
|
|
|
uid=34105(alainm) gid=401(sit) groups=401(sit),517(galilee),485(gspspec), 109(project)...
|
|
|
[alainm@zztop ~]$ newgrp project
|
|
|
[alainm@zztop ~]$ id alainm
|
|
|
uid=34105(alainm) gid=109(project) groups=401(sit),517(galilee),485(gspspec), 109(project)...
|
|
|
```
|
|
|
|
|
|
## Tips & tricks
|
|
|
* [Knowing the footprint of your directories](Storage/Knowing the footprint of your directories) |