You are not logged in.
Hey guys, I’m kind of lost and need some help.
Scenario:
My computer is set up with two hard drives: one SSD, which holds Arch and the /home folder, and a regular HDD, which holds the /var folder and where all data should go on two separate partitions.
Both partitions are mounted at /mnt/HDD2 and /mnt/HDD3.
Naturally, they both belong to root. However, since I want to be able to save all my music, games and whatnot on these two partitions I need to be able to access them as a normal user. On a single user system that would be a no-brainer; I would simply change the ownership. However, I plan to have another user use my computer from time to time and thus need to have the partitions accessible not only for one but a second user as well. And that’s where I can’t get things to work.
First I’ve changed the group for the partition (users) and added both users to the corresponding group (users) but could not write on the partition.
Then I’ve run chmod a+rxw on the partition. Beside the fact that I think that this is quite an inelegant solution, newly created folders where still only accessible by the corresponding user.
I’ve also set the SGID-Bit but no dice either.
Now I’m totally lost. Obviously, I’m missing something but I don’t see what.
tl;dr: I need access to a partition for different users on a single system so that they can easily save, write and share files between each other.
Any help appreciated.
Last edited by Janusz11 (2014-10-03 12:32:58)
Offline
Try with ACLs https://wiki.archlinux.org/index.php/Ac … trol_Lists
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
I haven't had to deal with multi-user setups, so forgive me if I am off base but shouldn't this just be a case of using the "user" option in fstab, then adding both users to a common group and giving that group access to the folders in question?
Offline
Hey scryan. The "user" option only means that a single user can mount (and unmount) that particular partition. But I'm perfectly fine with only root being able to mount (and unmount) the partitions. (They are both added to the system during boot by the way.)
*zap*
Problem meanwhile solved.
Last edited by Janusz11 (2014-10-03 12:32:30)
Offline
Problem solved.
I ended up using umask. It's basically a single user system anyway with a second user only using it from time to time and both of us having their own group. So it should be relatively save using umask.
I've changed the owner and group of the partition:
chown user1:group /mnt/HDD
...and the permissions:
chmod 2770 /mnt/HDD
...and added both users to the corresponding group of the partition:
gpasswd -a user1 group
gpasswd -a user2 group
Finally I've changed umask to 007 for each individual user while leaving the system-wide umask untouched.
Offline