You are not logged in.

#1 2009-05-13 11:13:12

melyadon
Member
From: Germany
Registered: 2007-10-17
Posts: 6

Discard ownership info for ext4 on a removable media

Hi,


I own a USB flash drive, which I intend to use only with GNU/Linux boxes, so I formatted it with ext4. With vfat and ntfs-3g, HAL used the uid= and guid= mount options to give my user ownership of all files on the partition. ext4 doesn't have these mount options. Is there an equivalent?


'chown -R user:user /media/disk' is not really an option for a removable media, since users are likely to have different UIDs on other PCs. Moreover, doing a chown as root every time the device is mounted couldn't be used with HAL automounting.

'chmod -R 777 /media/disk' is also not a good solution as I care about the permissions (for backup purposes) on the partition (and don't want to change my umask).


Does someone have a solution or isn't ext4 suitable for removable drives used with several PCs ? It would be a shame to have to resort to ntfs to exchange data between GNU/Linux systems.

Offline

#2 2009-06-08 11:29:19

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: Discard ownership info for ext4 on a removable media

I second that.
There's no way to set an umask, gid or pid ownership. How am I supposed to handle "shared" volumes or directories, using ext3/4?
POSIX ACL's wont do because they may inherit permisssions and whatnot when creating files, but not when copying files from a non ACL filesystem to an ACL enabled file system. (this is, however, possible with windows ACL's).

But to have HAL set pid/gid like that specifically for drives that are supposed to be "shared" like that, is a whole other issue as well. (but if one could set gid/pid ownership when mounting, one could at least set up shared directories/mountpoints, using ext3/4, manually).


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

#3 2009-06-08 14:20:28

melyadon
Member
From: Germany
Registered: 2007-10-17
Posts: 6

Re: Discard ownership info for ext4 on a removable media

This is only a workaround, but bindfs (a fuse file system available in AUR) provides uid and gid options:

bindfs -oowner=melyadon,group=users /tmp/mnt/flashdrive /tmp/mnt/bindfs

Offline

#4 2009-06-09 02:06:01

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: Discard ownership info for ext4 on a removable media

Hey melyadon. Thanks! smile
That was a really useful bit of software. Not only does it do what i want, it's got lot of features as well. Good times!

EDIT: With some hal/udev magic, you could probably set it up to automatically mount a usb stick (or what have you) with bindfs...

Last edited by pelle.k (2009-06-09 02:08:24)


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

Board footer

Powered by FluxBB