[Solved] How to Make USB Hard Drive Writable for all users

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
bolzak
Level 1
Level 1
Posts: 32
Joined: Wed Nov 03, 2021 5:44 pm

[Solved] How to Make USB Hard Drive Writable for all users

Post by bolzak »

I've got an external hard drive attached to my laptop and I want to have other (wiindows, android, etc) machines on my network to be able to write files to that drive. I'm listed as owner and have 'xrw' capabilities, but group and others only have 'r' access. I can't seem to change the permissions no matter what I try.

Appreciate ideas and suggestions.

Thanks,
Bill
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
ThaCrip
Level 5
Level 5
Posts: 988
Joined: Sat Dec 07, 2019 12:13 pm

Re: How to Make USB Hard Drive Writable for all users

Post by ThaCrip »

Assuming your are running Mint v20.x on that laptop running the USB hard drive and assuming it's formatted as EXT4, what I typically do to get full access to the hard drive through file manager is... "sudo chown $USER:$USER -R /location/to/harddrive" (without the "). then after that you should have full access to the hard drive through file manager as expected.

but for setting up general file sharing, I would assume your probably going to use Samba on it?
MainPC: i5-3550 (undervolted by -0.120v (CPU runs 12c cooler) /w stock i3-2120 hs/fan) | 1050 Ti 4GB | 16GB (2x 8GB) DDR3 1600Mhz RAM | Backups: AMD E-300 CPU (8GB RAM) / Athlon X2 3600+ CPU (@2.3GHz@1.35v) (4GB RAM) | All /w Mint 21.x-Xfce
bolzak
Level 1
Level 1
Posts: 32
Joined: Wed Nov 03, 2021 5:44 pm

Re: How to Make USB Hard Drive Writable for all users

Post by bolzak »

Sorry, didn't see this reply. I did what you advised and I am owner of /media/bill as well as media/bill/PASSPORT. The volume name of my drive is PASSPORT. I have successfully changed the permissions to the /media/bill directory, but I cannot do the same for the /media/bill/PASSPORT directory. I've tried both with chmod as well as through the nemo file manager.

I'm trying to do this so other devices on my network can save files to this drive. I have android devices and windows devices.

The partition type is NTFS/exFAT/HPFS. I don't have an option for ext4

Thanks for any help.
User avatar
AndyMH
Level 21
Level 21
Posts: 13503
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: How to Make USB Hard Drive Writable for all users

Post by AndyMH »

To access the drive/partition from other OS you must use a filesystem understood by those OS, the lowest common denominator is fat32 (significant limitations, bad choice) or ntfs. exFAT is a good choice, now supported in linux (but not all utilities understand it, like parted and gparted). As these filesystems do not support linux file attributes, chown or chmod are not going to have any effect.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
bolzak
Level 1
Level 1
Posts: 32
Joined: Wed Nov 03, 2021 5:44 pm

Re: How to Make USB Hard Drive Writable for all users

Post by bolzak »

So is it really all about the disk format? I've formatted another drive as ext4 and have been able to modify owner and permissions for everyone. Just as I wanted. If I had a drive that was formatted fat32 would I have any options of making this work? Because that's what my drive was formatted as and I couldn't change anything with chmod.

Thanks!
User avatar
AndyMH
Level 21
Level 21
Posts: 13503
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: How to Make USB Hard Drive Writable for all users

Post by AndyMH »

If you have any drive with a win filesystem on it and that drive has been near win10 and fast start has not been disabled in win10, that partition will be read-only to linux.

Fast start - default is enabled in win, it means it never really shuts down to give the illusion of faster boot times. Result is that the win filesystems are locked, hence read-only to linux. The fix is to plug the drive into the win10 machine, boot it and disable fast start and shut down.
https://help.uaudio.com/hc/en-us/articl ... Windows-10
If hibernate is enabled, disable that as well.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
bolzak
Level 1
Level 1
Posts: 32
Joined: Wed Nov 03, 2021 5:44 pm

Re: How to Make USB Hard Drive Writable for all users

Post by bolzak »

Thanks for all your help. I've been a windows user since around 1994 and am experimenting with linux. Some things are just going to take time. I will review the information you attached as well as some other articles I've come across regarding mounting usb drives via the fstab file in order to control the permissions.

Again, thanks for all the help! I do appreciate it. It makes learning more fun.
User avatar
AndyMH
Level 21
Level 21
Posts: 13503
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: How to Make USB Hard Drive Writable for all users

Post by AndyMH »

bolzak wrote: Tue Jun 28, 2022 6:51 pm I will review the information you attached as well as some other articles I've come across regarding mounting usb drives via the fstab file in order to control the permissions.

Again, thanks for all the help! I do appreciate it. It makes learning more fun.
There is no need to mount external drives/partitions via fstab, mint will do it automatically for you and mount them in /media/you. It helps if you have a label on the partition then it will mount at /media/you/mylabel. If you don't have a label, mint will use the UUID (a long number), which is less user friendly. You can add labels with gparted or disks.

Linux can be a steep learning curve, but it is worth it.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
bolzak
Level 1
Level 1
Posts: 32
Joined: Wed Nov 03, 2021 5:44 pm

Re: How to Make USB Hard Drive Writable for all users

Post by bolzak »

I've tried a few of the suggestions as offered above. I had a drive with data that I'd been using on my windows network that was formatted as ntfs and the permissions were in fact wide open. So no reformatting necessary to use on my linux device with global rwx permissions. I disabled fast boot on my windows computer and inserted a new usb stick and copied a file onto it. I then inserted the stick into my linux machine and was not able to change permissions. The file structure was fatal.

I guess as long as one is starting with an empty drive and formatted as either ntfs or ext4, permissions can be changed. The challenges become evident when an existing drive with data is formatted with a different file structure.

Thanks for everyone's help.

Bill
User avatar
AndyMH
Level 21
Level 21
Posts: 13503
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: [Solved] How to Make USB Hard Drive Writable for all users

Post by AndyMH »

I suspect you changed the fast start/boot option in BIOS, you need to turn off fast start in win. With it enabled (the default) win never really shuts down, it hibernates (to give the illusion of fast boot times). Result is any win filesystems are locked = read-only to linux.
https://help.uaudio.com/hc/en-us/articl ... Windows-10
If hibernate is enabled, disable that as well.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
bolzak
Level 1
Level 1
Posts: 32
Joined: Wed Nov 03, 2021 5:44 pm

Re: [Solved] How to Make USB Hard Drive Writable for all users

Post by bolzak »

I did turn off fast boot in windows, rebooted all before inserting the usb stick. I did NOT however, turn off hibernation.
Locked

Return to “Storage”