Are file permissions in files on external devices silly?
chrisccoulson at googlemail.com
Fri Nov 21 18:48:57 UTC 2008
On Fri, 2008-11-21 at 19:33 +0100, Martin Pitt wrote:
> Jesse Ruffin [2008-11-21 11:46 -0500]:
> > The real answer is to use mount options.
> > ADFS, AFFS, FAT (and variants), HFS, HPFS, ISO9660, and UDF all
> > support the 'gid' option. Combine that with the 'users' option
> You mean the "uid" option, like the vfat and ntfs file systems have.
> > As for doing this automatically, it could be included in the fstab
> > for fixed devices, such as floppy drives and CD/DVD drives.
> > Removable devices are a little harder
> No, actually not. The hard part are drives in /etc/fstab, since we
> cannot automatically change them during upgrades. However, that
> shouldn't be a concern because hardly any removable USB device is in
> fstab, except for CD-ROMs for historical reasons (which expose this
> very problem with UDF).
> For removable drives, once the kernel supports uid=/gid= options for
> hfs+ (Mac) and ext3 (other Linuxes), they can be trivially applied
> automatically in hal if a device is detected as removable. The hard
> part is to get kernel support for it.
There could be another way around getting the kernel to support the
uid=/gid= options for EXT3 and other filesystems. Bindfs  allows you
to bind mount directories and alter permissions/ownership of files on
the mirrored filesystems (leaving the underlying filesystem unchanged).
Perhaps this could be adopted when it becomes more stable, and get HAL
to bind mount the removable media? I'm currently using this filesystem
on my desktop to implement shared folders.
> > Doing this by default seems safe to me, but it would need more
> > thought and consensus before change.
> I mostly agree. I know systems which use USB hard drives as their main
> storage, where enforcing file system permissions is absolutely
> required. However, on such configurations, these drives are in fstab
> (for / or /home, etc.) and thus won't have the uid=/gid= options
> I don't think any user will expect enforced file permissions on an
> automount in /media/.
 - http://code.google.com/p/bindfs/
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 197 bytes
Desc: This is a digitally signed message part
More information about the Ubuntu-devel-discuss