D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Ext2 permissions



Neil Stone wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Rogers wrote:
| I have a USB memory stick that I did mke2fs on. I put a file in a
| directory on the memory stick from one PC but when I plugged it in
| another PC the UIDs don't matchup.
|
| Can the permissions of a directory be changed so that new files created
| in that directory have uid=nobody and gid=nogroup?
|
| Regards
| Andrew Rogers

If you specify a uid and gid at mount time (or in /etc/fstab) you should
be able to.

Added to /etc/fstab the line:

/dev/usbdisk /mnt/usbdisk ext2 noauto,users,gid=nogroup,uid=nobody 0 0

but when i did

$ mount /mnt/usbdisk/

I get:

mount: wrong fs type, bad option, bad superblock on /dev/usbdisk,
      or too many mounted file systems

But it mounted fine with:

/dev/usbdisk /mnt/usbdisk ext2 noauto,users 0 0

The mount manpage seems a bit vague in the ext2 options area.

Regards
Andrew Rogers



--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly