# ExtX file system on my usb key

if I format my usb key with an extX file system, copy some files on it and then give it to a friend for him to add files or modify existing one on this key, then he is rejected by its own system. Because its User ID (UID) nor GID are the same as mine on my machine.

How to get rid of this limitation? Is it possible to disable user rights on a ext2/ext3 partition?

Of course, I would really like not to rely on any other file system.

-
just curios but why do you want ext2/ext3? sure i agree that fat fs is junk but it do work better for sharing? –  Joakim Elofsson Jul 24 '09 at 9:54
I'made the same reflexion as yours, a fat-like file system better suits on an usb key. But it is a propietary file system AFAIK (MS one?). And I guess that linux addict people might propose a better solution for that ? Just wondering because I would really like to do without it me too. –  yves Baumes Jul 24 '09 at 18:30
Another reason for using extx2/3 is support for symbolic links. Doesn't matter for the odd file but if you want an untar'd collection of files that use these it can be important. –  mas Aug 4 '09 at 7:14

## 5 Answers

you can chmod 777 all of the files, to remove all of the restrictions.

-
cha ching! hit the jackpot! :D –  RCIX Jul 24 '09 at 11:36
glad to hear it helped –  Babu Jul 24 '09 at 15:44

Mount the drive with an option of umask=000. This tells the system to give every file newly created/copied on the system permissions of 777, unless told otherwise(such as via cp -p).

-
This solution is much better than the chmod suggestion, lay yier votes hire dear folks! –  Deleted Aug 1 '09 at 19:13
oooh, I was entirely unaware of this. That's very useful! –  Babu Aug 1 '09 at 19:16
I can't find that option for ext2/ext3 fs .. sigh ... Why ? I don't have any linux box at hand. Does they forget that in man page? linux.die.net/man/8/mount –  yves Baumes Aug 6 '09 at 18:47
That's a vfat/ntfs/hfs/hpfs mount option, not an xfs/ext2/ext3/ext4/reiserfs option! Stop confusing people! –  user62017 Jan 8 '11 at 22:05

Funnily enough a kernel patch to do some sort of UID remapping on ext mounts "to make them actually useful on removable media" turned up very recently. Doesn't seem to be too controversial in the subsequent discussion so it should make it into your favourite distro at some point.

BTW, I've used ext2/3 on removable media myself for years but it's almost entirely for rsynced backups where the whole point is to preserve all the file metadata.

-
very instersting link .. I wonder why anyone make that before . I will check it out when having some free time . thanx! –  yves Baumes Aug 3 '09 at 17:27

"Is it possible to disable user rights on a ext2/ext3 partition?" It is not but as more or less said before:

standing in the filesystem root (/media/<name>/) and doing chmod -R 777 . will set permission to allow anything on all filesystem.

-
Why not just chmod -R 777 /media/<name>/? –  grawity Jul 24 '09 at 8:54
The chmod won't have any effect on newly created files though - permissions are not inherited in ext3. (Setting all directories to setgid may help a little.) –  grawity Jul 24 '09 at 8:55
nothing wrong with doing it directly on /media/<name>, works too ofc –  Joakim Elofsson Jul 24 '09 at 9:38
just though the answer more generic as '/media/<name>' is just an example mountpoint (most likely correct in this case but...) –  Joakim Elofsson Jul 24 '09 at 9:45

You would want to use

chmod -R 777 /dev/sdc1/


In order to give permission for someone else to create in the root directory, as well.

-
this sets premission on the device entry, not the filesystem –  Joakim Elofsson Jul 23 '09 at 23:43
I think you actually want to set the mount point to 777 not the device entry. –  Jim OHalloran Jul 24 '09 at 0:54
Since a specific distro wasn't mentioned, I tried to do a generic, but, you're right, of course. –  Joshua Nurczyk Jul 24 '09 at 12:37