Haggis Veteran Posted March 12, 2014 Veteran Share Posted March 12, 2014 ok So i have some folders i want to share on the server i have /home/distros /home/photos /home/software Now i want everyone to be able to access the folders and i want two people to be able to read/write to the folders So am i better using two groups for this? so have share-admins share-users for example then have the users assigned to those groups? would it just be a case of sudo usermod -a -G share-admin haggis to add me and then sudo chgrp -R share-admin /home/distros sudo chmod -R g+w /home/distros Now i use Transmission to download the linux distros so do i need to add the transmission username to the share-admin group aswell so that it can write to the folders? also will the above make it so that any new files that are written by myself are also updated with those permissions? Link to comment Share on other sites More sharing options...
riahc3 Posted March 12, 2014 Share Posted March 12, 2014 Hello, ok So i have some folders i want to share on the server i have /home/distros /home/photos /home/softwareNow i want everyone to be able to access the folders and i want two people to be able to read/write to the folders So you want everyone to be able to read the folders but you only want two people to be able to read and WRITE to the folders. Correct? So am i better using two groups for this? so have share-admins share-usersfor example then have the users assigned to those groups? would it just be a case of sudo usermod -a -G share-admin haggis to add me and then sudo chgrp -R share-admin /home/distros sudo chmod -R g+w /home/distros Now i use Transmission to download the linux distros so do i need to add the transmission username to the share-admin group aswell so that it can write to the folders? also will the above make it so that any new files that are written by myself are also updated with those permissions? How many people is "everyone"? If "everyone" is a small dose, I wouldn't bother with groups. Link to comment Share on other sites More sharing options...
ichi Posted March 12, 2014 Share Posted March 12, 2014 Now i use Transmission to download the linux distros so do i need to add the transmission username to the share-admin group aswell so that it can write to the folders? also will the above make it so that any new files that are written by myself are also updated with those permissions? If transmission will be running under a different user then yes, you need to add that user to a group that has write permissions in that folder. And no, files you create won't necessarily have the same permissions you set for that folder. File (and directory) permission on creation are defined by umask, not chmod. You'd have to set the desired umask for your user in your ~/.bashrc (or globally for all users in /etc/profile). Then again umask could be overkill because it's applied to every single file and directory that user creates. If you want to apply specific creation permissions for files under one single specific folder then you'll be better off using ACLs. Unlike the standard mask permissions, ACLs are actually inherited by newly created files in the folder where ACLs are set. Link to comment Share on other sites More sharing options...
Haggis Veteran Posted March 14, 2014 Author Veteran Share Posted March 14, 2014 is umask used on partitions that are ext4?/ Link to comment Share on other sites More sharing options...
ichi Posted March 14, 2014 Share Posted March 14, 2014 is umask used on partitions that are ext4?/ As mount option in fstab, no. As command to set default permissions for user created files and directories, yes. Link to comment Share on other sites More sharing options...
Recommended Posts