You are not logged in.

#1 2008-05-17 11:48:38

lungdart
Member
Registered: 2008-05-15
Posts: 27

Setting sane default permissions on external har drive.

I have a 500GB external hard drive formated to Ext3. I also have multiple user accounts on my system who access the drive. When one user write to the drive, that file/directory only gives write permissions to that user. I want the drive to be open to one group.

So heres what I've got so far:

Create a group called "external"
Put the users I want access to the drive into that group
Set the drive mount point group to external and give it g+s permissions to allow that group to be the default for everything created inside it

This is where I get stumped. I need all files/directories in that mount point to have 664/775 permissions. But if I change umask to 0002, then that will be the default system wide. I want some sort of a directory specific umask. So the default is 0022 for the system, but 0002 for the mount point.

How would I go about doing this?

Thanks.

Offline

#2 2008-05-18 06:27:57

ScriptDevil
Member
From: In Front of My PC
Registered: 2006-04-06
Posts: 253

Re: Setting sane default permissions on external har drive.

Well, I am not too sure I captured the situation out there. But the point is that the guy who mounts the partition gets to be the owner.

You can set the umask for that partition alone in /etc/fstab

Create /media/external

#In /etc/fstab
/dev/sdc5 /media/external-disk ext3 defaults,umask=0002,gid=666 0 1 
#Where 666 is replaced by the group-id of external

Also, you may add noauto if you want


Be yourself, because you are all that you can be

Offline

#3 2008-05-23 16:16:35

lungdart
Member
Registered: 2008-05-15
Posts: 27

Re: Setting sane default permissions on external har drive.

That should work perfect.

Thanks!

Offline

Board footer

Powered by FluxBB