You are not logged in.
I want to have a linux partition on flash drive which I can insert on any linux system and have it automounted and to have read and write permission so as to copy and transfer files. I tried ext4 partition but it is not allowing me write after automounting (I need to open thunar with sudo for writing). I do not want to use fat32 format. I tried searching for this in wiki/forums/web but mostly it is suggested to mount it manually for proper permissions. Is it possible to have the partition automounted with read/write permission for the default user? Can ext2/ext3 provide this facility? Thanks for your help.
Last edited by rnarch (2012-08-12 12:59:10)
Offline
It sounds like the permissions of the filesystem do not allow you to use it properly. I guess that makes sense since mkfs.ext4 requires root access. Maybe simply issuing something like the following would do the trick:
# chown -R <UID>:<GID> /path/to/usb
$ chmod -R 777 /path/to/usb
Offline
Thanks for helping. I tried and it worked. Only thing is that if I make a new file on one linux system, it may not be readable on another linux system so I may have to repeat the above commands (unless username and groupname are same on 2 systems). Obviously there cannot be all features in any one format.
(Marking thread as solved)
Offline
well, the chown command makes it (presumably) your user as the owner, and then possibly the "user" group as the group owner. the chmod command then sets the permissions to 777 which is the same as setting it to ugo+rwx (user,group, and other add read, write and execute). So it should give correct permissions for access by anyone (hence other is given read write and execute permissions).
For access via same user, it is not the name, but rather the user id that is key. Same goes for group. For instance, on my machine, I previously dual booted with OSX, so in order to give mysefl access to my OSX partition without issue, I issued myself an UID of 501, which is where OSX starts issuing UID's. Whereas typically linux starts at 1000. But I can give mysefl any username I want as long as my uid matches.
Make sense?
Offline
Thanks for a detailed and clear explanation.
Offline
Yeah, no prob.... it worky work?
Offline
Note that you won't necessarily have read and write access to files and directories you create on the drive, though, if your uid/gid differ on another machine. Whether you do or not will depend (partly?) on your umask.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I believe they will depend entirely on your umask, but I figured just getting this guy to the point of writability was the goal. I probably should have mentioned that part of it tho.
Offline
It is working. But there is one peculiar point here. I have managed to transfer the entire arch system from one machine to another and the user etc is identical in 2 machines. That may be contributing to the seamless access that I am getting now with usb drive on these 2 computers.
Last edited by rnarch (2012-08-14 03:13:11)
Offline
@WonderWoofy,
I wasn't criticising your instructions . I could just imagine a follow-up issue...
@rnarch,
Yes, it would. You can check the ownership and permissions on the files to see how it is working, though.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
@cfe
I didn't think there was any criticism (besides, on these forums criticism is usually a means to an end), but you were right in that the explanation could have gone further, and probably would have achieved a greater understanding of the situation.
Offline