[Abandoned] Can't take ownership of exFAT HDD's

What other apps and distros do you use to round out your studio?

Moderators: MattKingUSA, khz

merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Can't take ownership of HDD's as root

Post by merlyn »

No, that's not right either. :D
jonetsu
Established Member
Posts: 2036
Joined: Sat Jun 11, 2016 12:05 am
Has thanked: 10 times
Been thanked: 22 times

Re: Can't take ownership of HDD's as root

Post by jonetsu »

I already mentioned that I do not use Windows file systems.

Death has replied to that: "The third step did create the empty 'test' file though. I do now have permission to write to the drive after previously remounting the drive with RW permissions."

When a drive is not mounted a mount point is just that, a mount point, and its ownership can be changed by root.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Can't take ownership of HDD's as root

Post by merlyn »

Find a fat formatted usb stick and try it.
jonetsu
Established Member
Posts: 2036
Joined: Sat Jun 11, 2016 12:05 am
Has thanked: 10 times
Been thanked: 22 times

Re: Can't take ownership of HDD's as root

Post by jonetsu »

If it's not mounted the mount point ownership can be changed. Will the Windows file system observe the ownership through a simple mount procedure is another matter which can be solved by passing mount the proper arguments.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Can't take ownership of HDD's as root

Post by merlyn »

That means your suggestion wouldn't work. Try it.
jonetsu
Established Member
Posts: 2036
Joined: Sat Jun 11, 2016 12:05 am
Has thanked: 10 times
Been thanked: 22 times

Re: Can't take ownership of HDD's as root

Post by jonetsu »

Death already reported that it did not work, right at the beginning. Then he followed it by a comment that he now got access:
Death wrote:
jonetsu wrote:Make the mount point belonging to user <name>. For user joe, a mount point of /mnt/disk and an external USB drive of /dev/sde1 :

(as root) chown joe.joe /mnt/disk

Then mount the drive still as root:

mount /dev/sde1

Then open another console and as regular user:

cd /mnt/disk
touch test

If the empty file 'test' is created then the regular user has permission to write.

This said, on Xubuntu 18.04 mount will change the ownership automatically to user, even if the mount point is root just before the mounting.
On the first step I get

Code: Select all

Operation not permitted
On the second step I get

Code: Select all

FUSE exfat 1.2.8
WARN: volume was not unmounted cleanly.
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
The third step did create the empty 'test' file though. I do now have permission to write to the drive after previously remounting the drive with RW permissions.
So that's already been stated.

And I already have said a reply ago:

" Will the Windows file system observe the ownership through a simple mount procedure is another matter which can be solved by passing mount the proper arguments."
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Can't take ownership of HDD's as root

Post by merlyn »

jonestu wrote:" Will the Windows file system observe the ownership through a simple mount procedure is another matter which can be solved by passing mount the proper arguments."
Try it and post the appropriate options.
jonetsu
Established Member
Posts: 2036
Joined: Sat Jun 11, 2016 12:05 am
Has thanked: 10 times
Been thanked: 22 times

Re: Can't take ownership of HDD's as root

Post by jonetsu »

Is this a quiz ? You seem bent on something.

If you want it real simple use 'pmount' as a user to mount your removable media.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Can't take ownership of exFAT HDD's as root

Post by merlyn »

Hopefully in the future you'll try solutions out before you post inaccurate information. In a previous post you implied Death was lying due to your lack of knowledge. Don't do that.
Death
Established Member
Posts: 372
Joined: Sun Oct 11, 2015 1:43 pm
Been thanked: 32 times

Re: Can't take ownership of exFAT HDD's as root

Post by Death »

I'm really enjoying the low key, passive aggressive nature of this thread :lol: But honestly, I appreciate you guys helping me!

As for the issue, I tried formatting the drives to ext4 which allowed me ownership of them, then when I formatted them back to exFAT, root took ownership again and I couldn't do anything about it. I got sick of dealing with it so just decided to keep the drives as ext4 for now. I'll have to come back to this later.. I just want to have some fun with Linux and play around with Qtractor for now. I always seem to spend so much time troubleshooting ;( Thanks everyone for your help though!

Btw, I just wanted to make sure of something - should my main system drive with Linux installed on it be owned by root? I assume so but I just wanted to check so I know for sure :wink:
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Can't take ownership of exFAT HDD's as root

Post by merlyn »

@Death Here's some commands that will change the ownership of your backup drive.

Code: Select all

$ sudo umount mountpoint
Because your drive was automatically mounted the mountpoint will probably disappear, so to be on the safe side make a new directory.

Code: Select all

$ sudo mkdir /mnt/backup
Check your user id is 1000.

Code: Select all

$ id -u
Now the mount command. Replace device with your device. If id -u returned a number other than 1000, change uid=1000 and gid=1000 to the number you got.

Code: Select all

$ sudo mount -o rw,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2 device /mnt/backup
You may have to tell your backup program about the new location of the drive. Eventually you'll want this to be automatic when you plug the drive in. I'm sure you can figure that out. The bit that caused problems was uid=1000,gid=1000. If they aren't specified the default is the uid of the process doing the mounting, in this case 0 which is root.

EDIT: You must have posted while I was writing this. Stick with ext4 if that's working.
jonetsu
Established Member
Posts: 2036
Joined: Sat Jun 11, 2016 12:05 am
Has thanked: 10 times
Been thanked: 22 times

Re: Can't take ownership of exFAT HDD's as root

Post by jonetsu »

Instead of using mount with those options (or less as it works well with less) as root, simply use pmount as a simple user for your removable devices :

pmount /dev/sde1

And that's it. It will even create a mount point for you You have full read/write access as simple user.

I gather that Death wants it simple at the command line. Maybe to better enjoy Life ! pmount is exactly made for that.

pmount works great on Ubuntu systems. Should work also on Linux MInt systems. (DID NOT TRY IT)
jonetsu
Established Member
Posts: 2036
Joined: Sat Jun 11, 2016 12:05 am
Has thanked: 10 times
Been thanked: 22 times

Re: Can't take ownership of exFAT HDD's as root

Post by jonetsu »

merlyn wrote:Hopefully in the future you'll try solutions out before you post inaccurate information. In a previous post you implied Death was lying due to your lack of knowledge. Don't do that.
The information I posted was totally 100% accurate within its original context. Death reported it did not work in his context and immediately said that he has gained r/w access by remounting the drive.

I did question one command executed by Death. He has also described that he does not like console, command line access, so questioning was in order.

Try not to use blind faith. And also, over reacting limits the horizon.

Now, for someone who does not like command line access and prefers GUI, you did suggest quite am extensive mount command to execute. Was this done in full benefit for the person preferring a GUI approach ... I could tend to believe it was not, at least not fully. A much simpler mount option would have worked equally since after all this is only for troubleshooting purposes, before going back to GUI applications.

Again, for the 3rd time, even better would be : pmount

No options, run as user. Perfect for removable devices.
merlyn
Established Member
Posts: 1392
Joined: Thu Oct 11, 2018 4:13 pm
Has thanked: 168 times
Been thanked: 247 times

Re: Can't take ownership of exFAT HDD's as root

Post by merlyn »

jonetsu wrote:The information I posted was totally 100% accurate within its original context.
You know your life would probably be better if when you're wrong you admit it.
jonetsu
Established Member
Posts: 2036
Joined: Sat Jun 11, 2016 12:05 am
Has thanked: 10 times
Been thanked: 22 times

Re: Can't take ownership of exFAT HDD's as root

Post by jonetsu »

This is totally 100% accurate:
jonetsu wrote: Make the mount point belonging to user <name>. For user joe, a mount point of /mnt/disk and an external USB drive of /dev/sde1 :

(as root) chown joe.joe /mnt/disk

Then mount the drive still as root:

mount /dev/sde1

Then open another console and as regular user:

cd /mnt/disk
touch test

If the empty file 'test' is created then the regular user has permission to write.
Although we see that you issued no comment on the much simpler use of pmount instead of your overly complex mount usage and options.

And despite your private message ordering me to "spare the forum" I will re-assert that the above procedure not only works fine, but is used on a current basis. That it was not the exact thing required during troubleshooting is another matter and was rapidly confirmed as such by the feedback immediately given by testing it.

And again, the console command 'pmount' is an ideal way to mount any removable drive as a simple user for a person who likes to use GUIs but has to use a console for some reason. No arguments but the drive device, run as a regular user ...

... and no Schwarzenegger-type Terminaltor list of endless arguments.
Post Reply