Are file permissions in files on external devices silly?

Martin Pitt martin.pitt at ubuntu.com
Fri Nov 21 18:33:02 UTC 2008


Jesse Ruffin [2008-11-21 11:46 -0500]:
> The real answer is to use mount options.

Exactly.

> 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.

> 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
applied.

I don't think any user will expect enforced file permissions on an
automount in /media/.

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20081121/96d1d7fc/attachment.sig>


More information about the Ubuntu-devel-discuss mailing list