[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /media and /mnt ownership and permissions



On Saturday 08 March 2008 21:35, Haines Brown wrote:
> Be default on my system, both are owned by root/root, and since that got
> in my way when I was in a hurry, I simply changed their ownership to
> owner/owner. I know this isn't proper. My setting up a sidux on X61s
> Thinkpad is an opportunity for me to start out the right way.
>
> My inclination would ge to assign these directories to a group and make
> user a member of that group. But no default group name seems to fit right,
> which makes me suspect this might not be the proper way after all.
>
> When I plug in a usb-stick, it is assigned the interface sdb, which on
> sidux is owned by root/floppy. Should /media be owned by root/floppy?
> How about /mnt?

  I don't know any "official" answer, but what I do is have 
/media and /mnt owned by root:root, but with open permissions.

  Then you can control the access and ownership of the mounted 
media through the mount mechanism or /etc/fstab.  For FAT32 
filesystems (like the USB stick), mount them with the 
appropriate username and groupname options, so that only that
user can meddle with them.  

  For Linux filesystems, you just have to hope that the numeric 
uids and gids of the files on the device are meaningful on your 
system, but in my experience, remote media are usually either
iso9660 for FAT32, so practically speaking, this isn't an issue.

				-- A.
-- 
Andrew Reid / reidac@bellatlantic.net


Reply to: