You are not logged in.
Hi there. I have the following problem.
At home we have a "family-pc" which runs arch. Every family member has an account on this computer. I get a brand-new harddisk which I wanted to use as a data-storage for digital images, music and documents for the entire family.
I formated the disk with ext3 filesystem and mounted it to /mnt/share. I created a group "share" and added every existing user to the group "share". What I want is the following. I want to have _everyone_ fully read/write/execute rights on this partition. That means, that if user A creates a folder, user B should be able to delete it,... (i know one should not do this but I want to and have to...).
I can
chown root:share /mnt/share -R; chmod 2777 /mnt/share -R
as root, which _should_ be enough.
The problem is, that whenever user A creates a folder on /mnt/share, the group rights of this folder for usergroup "share" are "read only". So it seems to me that mkdir overrides some settings.
Anyone who can help me on how to solve my problem?
Thanks in advance...
Offline
Try mounting it with "gid=share,umask=0002" option (place that in fstab in 4th column).
Offline
Try mounting it with "gid=share,umask=0002" option (place that in fstab in 4th column).
Hi Lucke.
Thx for your answer. I forgot to mention that I already tried this. The problem is that it seems one can't mount an ext3 partition with gid / umask parameters. This results in a "bad superblock on..." message.
Bernhard
Offline
dw you want the sticky bit set. That grants permissions only to the user who created the file or directory.
So try something like this:
chown root:share /mnt/share
chmod 1775 /mnt/share
and add your users to the share group.
Anyone from share group can create directories or files in /mnt/share and only the original user can delete/modify his own files.
Offline
dw you want the sticky bit set. That grants permissions only to the user who created the file or directory.
So try something like this:
chown root:share /mnt/share chmod 1775 /mnt/share
and add your users to the share group.
Hi T-Dawg.
I've tried both
chmod 1777 /mnt/share -R
and
chmod 2777 /mnt/share -R
but whenever a user creates a directory, the group-rights are set to read-only
Offline
I've run into the same issue in the past, for a job, and unfortunately the only solutions I could come up with were:
1) Change the default umask to 0002 - probably a bad idea since this is a global setting.
2) Use a different filesystem that honors the fstab umask setting - didn't really research this, not sure if it'll work with directory creation or not.
3) Setup a cron job that chown's the mount once every few minutes.
I went with 1, but it's a shitty solution to a problem created by a filesystem that seems to assume that it knows more than you do. The ONLY reason I chose #1 is that the box was behind a firewall, there was no lagtime, and these users wouldn't ever be accessing anything outside that one directory anyhow.
Unthinking respect for authority is the greatest enemy of truth.
-Albert Einstein
Offline
Maybe it's possible with ACLs?
Never dug into those.
Setting global umask (in /etc/profile) could be also an option, as mentioned, although obviously not so desirable.
-edit-
mkdir has a -m flag which allows you to specify mode. That's a solution for creating dirs, at least from CLI (a lil' alias would be nice).
Files seems to be an other story, however.
-edit-
Offline
I had the same problem and it seems that solution is ACL. You can set default permissions for files and directories created in some directory. For example to set read/write permissions for group you can do this:
setfacl -d -m g::rwx /mnt/share
These settings are also inherited by subdirectories created in this directory.
It can also be useful to set setgid bit for directory.
Offline