Originally Posted by
pjmlmas
initial install of ubuntu created user tom:tom. User = tom, group = tom
say I have multiple users, on multiple partitions.
I have an ext4 share partition, sharepart.
If tom makes a directory on sharepart, it is under tom:tom. So I should use groups,but...builtins or custom group. I see a group called users id = 100. Just make all users on all partitions part of this group?
Also, the shared partition, the top level is root:root, should this be changed to say users:users or something.
Users permissions are at the directory and file level. If you have multiple mortal users (humans) and you want to share data then, yes, you should use a common group such as the group users (gid=100). But you could also make your own group. You are not limited to the default groups. To see all the users (both mortal and system) try this from the CLI...to see all the groups try thisI have many shared branches of the file system that have ownership at root:users. The fact that the top level is root:root does not tell the whole story. By default the root:root directory has these permissions u=rwx,g=rwx,o=r-x (0775). This means the directory is world (everyone) readable and can be descended into. If the user can traverse the directory (decend) and the subdirectory has the user group ownership and the proper permissions all will work.
Here is a look at an implementation I have on this workstation
Code:
ls -ld /srv
drwxr-xr-x 3 root root 4096 Aug 31 16:51 /srv
ls -ld /srv/public
drwxrwsr-x 9 root users 4096 Dec 4 10:04 /srv/public
...As you see I set the sgid bit (see red above) to create group inheritance of the data.
All of this assumes you are using one instance of Ubuntu. If you have multiple OS's and want to share a file system, you will need to make sure that at the very least the users group always has the same gid. Ubuntu uses the gid rather than the group name as ID.
Bookmarks