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

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

Moderators: khz, MattKingUSA

Death
Established Member
Posts: 162
Joined: Sun Oct 11, 2015 1:43 pm

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

Postby Death » Mon Feb 11, 2019 12:31 pm

I've abandoned this issue. Thanks for the help! Original post below:

I recently seem to have lost ownership of my external, exFAT formatted USB HDD's. Root owns them now. I recently ran Photorec to look for some deleted files and noticed this issue after that. But I also downgraded my kernel too so I'm not sure if it's that which has caused it. Anyway, Im using Linux Mint 19.1 and I opened my file manager (Nemo) as root and then tried to change the ownership of these HDD's back to my user account via the GUI but it just tells me that the operation is not permitted. If I can't change it as root then how can I actually get these drives back? :shock:
Thanks!

Updates:
* Apparently these drives were mounted as Ready Only. I've successfully remounted the drives with Read/Write access.
* GUI & Terminal methods for taking ownership are still returning "Operation not permitted" messages. Root still owns them.
Last edited by Death on Wed May 08, 2019 12:28 am, edited 9 times in total.

merlyn
Established Member
Posts: 496
Joined: Thu Oct 11, 2018 4:13 pm

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

Postby merlyn » Mon Feb 11, 2019 1:23 pm

Try using chown from the command line.

Death
Established Member
Posts: 162
Joined: Sun Oct 11, 2015 1:43 pm

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

Postby Death » Mon Feb 11, 2019 1:46 pm

merlyn wrote:Try using chown from the command line.


Yeh I did that already and it didn't work :(

merlyn
Established Member
Posts: 496
Joined: Thu Oct 11, 2018 4:13 pm

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

Postby merlyn » Mon Feb 11, 2019 1:47 pm

you used sudo chown?

Death
Established Member
Posts: 162
Joined: Sun Oct 11, 2015 1:43 pm

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

Postby Death » Mon Feb 11, 2019 1:55 pm

merlyn wrote:you used sudo chown?


I believe so. But to be honest, I forgot the exact command I used which is why I didn't mention it in my opening post. I'm actually just looking up some commands for this now so I can try again. I will post back with results. Thanks :wink:

Death
Established Member
Posts: 162
Joined: Sun Oct 11, 2015 1:43 pm

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

Postby Death » Mon Feb 11, 2019 2:01 pm

Ok. So I just tried:

Code: Select all

sudo chown myusername:myusername mountpoint

I obviously used my actual username and mountpoint for the drive when I did that. The result was:

Code: Select all

chown: changing ownership of 'mountpoint': Operation not permitted


This is what happened before. Is there another command I can try? Cheers.

merlyn
Established Member
Posts: 496
Joined: Thu Oct 11, 2018 4:13 pm

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

Postby merlyn » Mon Feb 11, 2019 2:02 pm

You may have mounted the drives read only, or something like that rather than this being a permissions issue.

merlyn
Established Member
Posts: 496
Joined: Thu Oct 11, 2018 4:13 pm

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

Postby merlyn » Mon Feb 11, 2019 2:08 pm

You need chown -R to operate recursively on a whole drive.

Death
Established Member
Posts: 162
Joined: Sun Oct 11, 2015 1:43 pm

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

Postby Death » Mon Feb 11, 2019 2:10 pm

merlyn wrote:You need chown -R to operate recursively on a whole drive.


I tried that just now but it's the same results.

I suspect Photorec may have made the drives Read Only the other day. Any idea how I would check and change that?

merlyn
Established Member
Posts: 496
Joined: Thu Oct 11, 2018 4:13 pm

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

Postby merlyn » Mon Feb 11, 2019 2:14 pm

Code: Select all

mount -l

Death
Established Member
Posts: 162
Joined: Sun Oct 11, 2015 1:43 pm

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

Postby Death » Mon Feb 11, 2019 2:23 pm

merlyn wrote:

Code: Select all

mount -l


Cheers. Although I did try that just now and got another permission denied (or similar) message. However, I found a command from here which I've modified for my system: https://askubuntu.com/questions/333287/ ... -read-only
Actually looks like it might be working and my backup program is able to run tasks again. So yeh, I learned something new today! Time to take more notes :P If I get more issues I will post back. Thanks for the help!

Edit: Actually, the command I tried was

Code: Select all

fdisk -l
which still gives the ouput

Code: Select all

fdisk: cannot open /dev/sda: Permission denied
fdisk: cannot open /dev/sdb: Permission denied
fdisk: cannot open /dev/mapper/mint--vg-root: Permission denied
fdisk: cannot open /dev/mapper/mint--vg-swap_1: Permission denied
fdisk: cannot open /dev/mapper/cryptswap1: Permission denied
fdisk: cannot open /dev/sdc: Permission denied
fdisk: cannot open /dev/sdd: Permission denied


Code: Select all

mount -l
works.

Just added that for clarity. I was getting confused amongst all this :lol:

merlyn
Established Member
Posts: 496
Joined: Thu Oct 11, 2018 4:13 pm

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

Postby merlyn » Mon Feb 11, 2019 2:41 pm

The 'Permission denied' when you tried fdisk isn't an error. You need to run fdisk with sudo. The only part of the filesystem you as a normal user have access to is your home folder. So since /dev/sda is in / you need sudo to access it.

Death
Established Member
Posts: 162
Joined: Sun Oct 11, 2015 1:43 pm

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

Postby Death » Mon Feb 11, 2019 2:43 pm

Damn it. Spoke too soon!

I forgot about trying to take ownership of the drives again. I tried via GUI and terminal methods once more but still got "Operation not permitted" :(

So, my drives are mounted with RW access now. I can create new folders and files in them so I assume so anyway. But, root is still the owner and I can't take them. Any ideas what to try next?

merlyn
Established Member
Posts: 496
Joined: Thu Oct 11, 2018 4:13 pm

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

Postby merlyn » Mon Feb 11, 2019 2:56 pm

I'm not sure what you mean by 'take'. If you can write a file then all would seem to be well.

Look at the owner of the files and folders. Are they 'root'?

Death
Established Member
Posts: 162
Joined: Sun Oct 11, 2015 1:43 pm

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

Postby Death » Mon Feb 11, 2019 3:00 pm

merlyn wrote:I'm not sure what you mean by 'take'. If you can write a file then all would seem to be well.


Take ownership I meant. My backup program has been stalling and returning errors about permissions ever since this issue appeared. I cannot do any backups right now because of this. I've checked the drive for errors and it's apparently ok. I've reformatted it too. Something happened around the time I used Photorec and I think it's changed something in my config somewhere. This is why I want to take ownership of these drives so I can see if my backups work again..


Return to “Linux Distributions & Other Software”

Who is online

Users browsing this forum: No registered users and 2 guests