[Abandoned] Can't take ownership of exFAT HDD's
Moderators: MattKingUSA, khz
[Abandoned] Can't take ownership of exFAT HDD's
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?
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.
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?
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.
Re: Can't take ownership of HDD's as root
Yeh I did that already and it didn't workmerlyn wrote:Try using chown from the command line.
Re: Can't take ownership of HDD's as root
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. Thanksmerlyn wrote:you used sudo chown?
Re: Can't take ownership of HDD's as root
Ok. So I just tried:
I obviously used my actual username and mountpoint for the drive when I did that. The result was:
This is what happened before. Is there another command I can try? Cheers.
Code: Select all
sudo chown myusername:myusername mountpoint
Code: Select all
chown: changing ownership of 'mountpoint': Operation not permitted
Re: Can't take ownership of HDD's as root
I tried that just now but it's the same results.merlyn wrote:You need chown -R to operate recursively on a whole drive.
I suspect Photorec may have made the drives Read Only the other day. Any idea how I would check and change that?
Re: Can't take ownership of HDD's as root
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-onlymerlyn wrote:Code: Select all
mount -l
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 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
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
Just added that for clarity. I was getting confused amongst all this
-
- 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
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.
Re: Can't take ownership of HDD's as root
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?
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?
-
- 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
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'?
Look at the owner of the files and folders. Are they 'root'?
Re: Can't take ownership of HDD's as root
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..merlyn wrote:I'm not sure what you mean by 'take'. If you can write a file then all would seem to be well.