View previous topic :: View next topic |
Author |
Message |
dE_logics Advocate
Joined: 02 Jan 2009 Posts: 2289 Location: $TERM
|
Posted: Sun Jan 22, 2012 6:15 am Post subject: Force permissions. |
|
|
Is there any way to force specific permissions for files and directories separately even if it has been copied from somewhere else? _________________ My blog |
|
Back to top |
|
|
dE_logics Advocate
Joined: 02 Jan 2009 Posts: 2289 Location: $TERM
|
Posted: Sun Jan 22, 2012 10:38 am Post subject: |
|
|
Or a better solutions maybe -- set default permissions for mounting optical media and USB fat/ntfs storage devices. _________________ My blog |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
dE_logics Advocate
Joined: 02 Jan 2009 Posts: 2289 Location: $TERM
|
Posted: Tue Jan 24, 2012 4:43 am Post subject: |
|
|
Not from fstab. I was wondering about doing the same for hotplugging CD/DVD/block devices. _________________ My blog |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
dE_logics Advocate
Joined: 02 Jan 2009 Posts: 2289 Location: $TERM
|
Posted: Tue Jan 24, 2012 2:38 pm Post subject: |
|
|
Jaglover wrote: | dE_logics wrote: | Not from fstab. |
Not sure what you mean by that, I'm using fmask=133 in fstab for my USB sticks. |
You have listed fstab like -
/dev/sr0
/dev/sdb
/dev/sdc
/dev/sdd
etc...
?
dE_logics wrote: | I was wondering about doing the same for hotplugging CD/DVD/block devices. | http://reactivated.net/writing_udev_rules.html#ownership[/quote]
This changes the permission of the device node, not the mounted FS (?). _________________ My blog |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Tue Jan 24, 2012 2:46 pm Post subject: |
|
|
Code: | /dev/sdc1 /media/stick vfat noatime,users,noauto,fmask=133,shortname=lower 0 0 |
That's one line from my fstab.
You are correct about udev, the only other idea I can come up with is to run a post-mount script that sets ownership and permissions. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
dE_logics Advocate
Joined: 02 Jan 2009 Posts: 2289 Location: $TERM
|
Posted: Wed Jan 25, 2012 4:27 pm Post subject: |
|
|
This fstab method is actually a workaround. It should be handled with udisks which's the proper way.
The major problem with the default permissions is that in multiuser systems where FS is shared and you've set groups as common among them (so they may have correct rw regardless of the user owning the files); only the user who copies the content form the external device to the shared filesystem has write access, otherwise everyone else has ro access, cause the permissions are g-w.
This causes inconvenience to the very end users. _________________ My blog |
|
Back to top |
|
|
|