GUI method to change ownership of a drive after formatting with GParted

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5548
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

GUI method to change ownership of a drive after formatting with GParted

Post by Lady Fitzgerald »

I never could wrap my mind around chown commands (and even if I could, I'd never remember them or I would type them wrong) so I use a GUI method to change ownership of a folder or drive. BTW, this works only on Linux file systems; it will not work on NTFS, FAT, Fat32, or ExFAT.

1. Right click on and empty space when the drive is opened.
2. On the menu that opens, click on Open as Root
3. Type in your password if prompted and hit ENTER. Otherwise, move on to Step 4.
4. In the window that popped up, right click on an empty space.
5. In the next window that pops up, click on Properties
6. In the next window, click on the Permissions tab at the top of the window.
7.In the next window, scroll the Owner box until you find your user name (or the user name you want) and click on it (it will show the user name being repeated after you choose it).
8. Next, scroll in the Group box until you find the same user name and click on it.
9. Close all the windows, then check to see if the selected user name can read and write to the drive. If so, you are done.

It seems more involved than using the terminal but it's something that is easy for me to remember and it's never failed me or broke anything.

Edit: Since Mint 19.3, an option has been added to Disks to take ownership of a disk.

Disks screen.png
Disks screen.png (110.65 KiB) Viewed 2192 times

Just be sure to read the "warning" that comes up after clicking on "Take Ownership" item before going on to determine how and if you should proceed.
Last edited by Lady Fitzgerald on Wed Aug 23, 2023 3:51 pm, edited 5 times in total.
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
User avatar
all41
Level 19
Level 19
Posts: 9441
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: GUI method to change ownership of a folder or drive created as root

Post by all41 »

OK for Nemo and Caja, but not Thunar

Good tutorial LF
Everything in life was difficult before it became easy.
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5548
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: GUI method to change ownership of a folder or drive created as root

Post by Lady Fitzgerald »

all41 wrote: Wed Feb 22, 2023 12:46 am OK for Nemo and Caja, but not Thunar

Good tutorial LF
Thanks!
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
User avatar
deck_luck
Level 7
Level 7
Posts: 1577
Joined: Mon May 27, 2019 6:57 pm
Location: R-4808 North

Re: GUI method to change ownership of a folder or drive created as root

Post by deck_luck »

You go gurl! :D
🐧Linux Mint 20.3 XFCE (UEFI - Secure Boot Enabled) dual boot with Windows 11

Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5548
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: GUI method to change ownership of a folder or drive created as root

Post by Lady Fitzgerald »

deck_luck wrote: Wed Feb 22, 2023 1:24 am You go gurl! :D
Thanks!
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
altair4
Level 20
Level 20
Posts: 11395
Joined: Tue Feb 03, 2009 10:27 am

Re: GUI method to change ownership of a folder or drive created as root

Post by altair4 »

Just a suggestion but you may want to preface this HowTo with a note that it applies only to Linux filesystems.

Has no affect on NTFS, FAT, Fat32, or ExFAT.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5548
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: GUI method to change ownership of a folder or drive created as root

Post by Lady Fitzgerald »

altair4 wrote: Wed Feb 22, 2023 8:56 am Just a suggestion but you may want to preface this HowTo with a note that it applies only to Linux filesystems.

Has no affect on NTFS, FAT, Fat32, or ExFAT.
Will do and thanks!
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
User avatar
CapnGimp
Level 1
Level 1
Posts: 5
Joined: Thu May 25, 2023 12:40 pm
Location: 65 miles south of Alpine, TX

Re: GUI method to change ownership of a folder or drive created as root

Post by CapnGimp »

I just tried this method, IF there are folders in the drive, the owner does NOT change, it remains as root. So I clicked the box that said "apply to all ...' and this worked, after I changed the THREE boxes, OWNER, GROUP, FOLDER ACCESS, and changed them to create and delete, then hit the APPLY PERMISSION TO THE ENCLOSED FILES. I have 4 HDs and those have a handful of different partitions on them. So I have spent the last hour or so going through them to correct it , so that I have access to everything, like I am used to. I built this computer in 2013, and have all my stuff on it from pictures, books, etc., dating back to about 2002. I have upgraded the MAIN os every few years, and did a fresh install occasionally as I just did from 19.3 to 21.1
This is the first time I have used an EFI boot system. So I tend to forget some of the commands and have to look them up again. I am beyond knowing it intricately since I ceased building and repairing computers about 5 years ago. I ALWAYS did it for free for friends since 1996. Anywho, I hope this helps someone, spent a lot of my day on it, lol. I tried doing it according to another post I found through search that said use DISK and change the names then reboot, did that yesterday and got on it again this morning and it was back to normal-you don't own it, blah. MANY thanks to the original post in this thread, you saved me a lot of headache! Now, on with my day. Going to download the new LMDE by torrent and set it up, which was the original task that wouldn't allow placing torrents on the new partition/drive, 2 or 3 days ago. Hate the site lost my credentials from many moons ago, but at least I got a new account with the same credentials I have used here all these years, klunkputerz, whooda thunk.
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5548
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: GUI method to change ownership of a folder or drive created as root

Post by Lady Fitzgerald »

CapnGimp wrote: Fri May 26, 2023 1:22 pm I just tried this method, IF there are folders in the drive, the owner does NOT change, it remains as root. So I clicked the box that said "apply to all ...' and this worked, after I changed the THREE boxes, OWNER, GROUP, FOLDER ACCESS, and changed them to create and delete, then hit the APPLY PERMISSION TO THE ENCLOSED FILES. I have 4 HDs and those have a handful of different partitions on them. So I have spent the last hour or so going through them to correct it , so that I have access to everything, like I am used to. I built this computer in 2013, and have all my stuff on it from pictures, books, etc., dating back to about 2002. I have upgraded the MAIN os every few years, and did a fresh install occasionally as I just did from 19.3 to 21.1
This is the first time I have used an EFI boot system. So I tend to forget some of the commands and have to look them up again. I am beyond knowing it intricately since I ceased building and repairing computers about 5 years ago. I ALWAYS did it for free for friends since 1996. Anywho, I hope this helps someone, spent a lot of my day on it, lol. I tried doing it according to another post I found through search that said use DISK and change the names then reboot, did that yesterday and got on it again this morning and it was back to normal-you don't own it, blah. MANY thanks to the original post in this thread, you saved me a lot of headache! Now, on with my day. Going to download the new LMDE by torrent and set it up, which was the original task that wouldn't allow placing torrents on the new partition/drive, 2 or 3 days ago. Hate the site lost my credentials from many moons ago, but at least I got a new account with the same credentials I have used here all these years, klunkputerz, whooda thunk.
Thanks! I responded to you yesterday but something happened to the post (made like an Orange Crush and evaporated?). I'll be looking into this and making necessary corrections when I'm feeling better (I'm dealing with a blown back and some bug that's making me feel a bit queasy).
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
User avatar
CapnGimp
Level 1
Level 1
Posts: 5
Joined: Thu May 25, 2023 12:40 pm
Location: 65 miles south of Alpine, TX

Re: GUI method to change ownership of a folder or drive created as root

Post by CapnGimp »

Hope you are feeling better! Monsoon season arrived here in the desert early and it's been storms and high winds for days, that's why I was inside FINALLY loading Mint 21 :D Thanks for the help, again.
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5548
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: GUI method to change ownership of a folder or drive created as root

Post by Lady Fitzgerald »

CapnGimp wrote: Mon May 29, 2023 11:32 am Hope you are feeling better! Monsoon season arrived here in the desert early and it's been storms and high winds for days, that's why I was inside FINALLY loading Mint 21 :D Thanks for the help, again.
Thanks! I'm hoping our monsoon holds off for a while longer (it usually doesn't hit until early July but some years, it's early, late, or is a "nonsoon" like last years was).
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
JoHubb
Level 4
Level 4
Posts: 221
Joined: Thu Feb 22, 2018 6:47 am
Location: Ireland

Re: GUI method to change ownership of a drive after formatting with GParted

Post by JoHubb »

Sorry, Jeannie, but this solution did not work for me.

My folder, subfolders and files are all locked. They are owned by sudo. The HDD is formatted, ext4.

Using caja, I do not get the option to 'Open as Root' when I right-click on a blank space. Same with dolphin.

If I go straight to Permissions, the options to change from root ownership are greyed out.
It tells me,

You are not the owner and cannot change these permissions.
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5548
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: GUI method to change ownership of a drive after formatting with GParted

Post by Lady Fitzgerald »

JoHubb wrote: Tue Aug 22, 2023 6:16 pm Sorry, Jeannie, but this solution did not work for me.

My folder, subfolders and files are all locked. They are owned by sudo. The HDD is formatted, ext4.

Using caja, I do not get the option to 'Open as Root' when I right-click on a blank space. Same with dolphin.

If I go straight to Permissions, the options to change from root ownership are greyed out.
It tells me,

You are not the owner and cannot change these permissions.
Well, that's odd. How did you wind up with all your folders, etc. being owned by root?
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
JoHubb
Level 4
Level 4
Posts: 221
Joined: Thu Feb 22, 2018 6:47 am
Location: Ireland

Re: GUI method to change ownership of a drive after formatting with GParted

Post by JoHubb »

Lady Fitzgerald wrote: Wed Aug 23, 2023 1:18 am
Well, that's odd. How did you wind up with all your folders, etc. being owned by root?

I copied the entire contents of a NAS (around 6 TB) to an external HDD (16TB).
I used the Synology USB copy utility.

Everything has copied beautifully except everything is locked! If I had hair I'd tear it out.....
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5548
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: GUI method to change ownership of a drive after formatting with GParted

Post by Lady Fitzgerald »

JoHubb wrote: Wed Aug 23, 2023 3:00 am
Lady Fitzgerald wrote: Wed Aug 23, 2023 1:18 am
Well, that's odd. How did you wind up with all your folders, etc. being owned by root?

I copied the entire contents of a NAS (around 6 TB) to an external HDD (16TB).
I used the Synology USB copy utility.

Everything has copied beautifully except everything is locked! If I had hair I'd tear it out.....
You've traveled out of my wheelhouse since I've never used a NAS. While it would be extreme and time consuming to redo your copy, have you tried using simple copy and paste or drag and drop to transfer data from the NAS to your external drive.?An even better way might be to use a folder/file syncing program, such as FreeFileSync, to copy your data over since it has the ability to be set to verify each file copy was done accurately and will give a report when finished if any files failed to copy over (which has been extremely rare for me).
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
User avatar
jackkileen
Level 4
Level 4
Posts: 353
Joined: Mon Feb 04, 2019 7:58 pm
Location: Rocky Mtn High; FL Gulf

Re: GUI method to change ownership of a drive after formatting with GParted

Post by jackkileen »

Lady Fitzgerald wrote: Tue Feb 21, 2023 1:49 pm I never could wrap my mind around chown commands (and even if I could, I'd never remember them or I would type them wrong) so I use a GUI method to change ownership of a folder or drive. BTW, this works only on Linux file systems; it will not work on NTFS, FAT, Fat32, or ExFAT.

It seems more involved than using the terminal but it's something that is easy for me to remember and it's never failed me or broke anything.
Does using "Take Ownership" using Disks accomplish the same thing?
I had one my MVMe drives that was owned by root that this worked on.


Disks screen.png
MINT: 21.3 Cinnamon 6.0.4_Kernel:6.5.0-15-generic - AMD Ryzen 9 5950X 16-Core Processor × 16
BIG LINUX: KDE Plasma Version: 5.27.10_Kernel Version 6.6.10-1_GP:X11
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5548
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: GUI method to change ownership of a drive after formatting with GParted

Post by Lady Fitzgerald »

jackkileen wrote: Wed Aug 23, 2023 12:45 pm
Lady Fitzgerald wrote: Tue Feb 21, 2023 1:49 pm I never could wrap my mind around chown commands (and even if I could, I'd never remember them or I would type them wrong) so I use a GUI method to change ownership of a folder or drive. BTW, this works only on Linux file systems; it will not work on NTFS, FAT, Fat32, or ExFAT.

It seems more involved than using the terminal but it's something that is easy for me to remember and it's never failed me or broke anything.
Does using "Take Ownership" using Disks accomplish the same thing?
I had one my MVMe drives that was owned by root that this worked on.



Disks screen.png
I had never tried that since that option wasn't enabled in 19.3, which is what I was using when I wrote the tutorial. It does show up in my 20.1 machine so, after connecting a 500GB drive I keep for testing via USB to a 20.1 machine, I reformatted it and did a quick test after ignoring a long and slightly scary warning:

Changes ownership of the filesystem to your user and group. The recursive mode does also change the ownership of all subdirectories and files, this can lead to destructive results when the filesystem contains a directory structure where ownership should belong to different users (e.g., a system backup or a filesystem that is accessed by multiple users).

It worked. Afterwards (and reading, not just glancing at, the warning), since the warning didn't specify that the ownership change would be confined to just that drive, to make sure the change in ownership was confined to just that drive, I checked a few files in the System that are supposed to be root and they still were (whew! even though I only needed to restore the latest Timeshift Snapshot to fix it).

Thanks for bringing this to my attention. I'll add it to the tutorial.
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
JoHubb
Level 4
Level 4
Posts: 221
Joined: Thu Feb 22, 2018 6:47 am
Location: Ireland

Re: GUI method to change ownership of a drive after formatting with GParted

Post by JoHubb »

Lady Fitzgerald wrote: Wed Aug 23, 2023 10:31 am
JoHubb wrote: Wed Aug 23, 2023 3:00 am
Lady Fitzgerald wrote: Wed Aug 23, 2023 1:18 am
Well, that's odd. How did you wind up with all your folders, etc. being owned by root?

I copied the entire contents of a NAS (around 6 TB) to an external HDD (16TB).
I used the Synology USB copy utility.

Everything has copied beautifully except everything is locked! If I had hair I'd tear it out.....
You've traveled out of my wheelhouse since I've never used a NAS. While it would be extreme and time consuming to redo your copy, have you tried using simple copy and paste or drag and drop to transfer data from the NAS to your external drive.?An even better way might be to use a folder/file syncing program, such as FreeFileSync, to copy your data over since it has the ability to be set to verify each file copy was done accurately and will give a report when finished if any files failed to copy over (which has been extremely rare for me).
I got sorted. If I had used FreeFileSync or something I might have avoided trouble. On the other hand, I have had bad experiences with backup utilities - ending up with files with strange file extensions which i cannot open! Without paying, that is!
User avatar
Lady Fitzgerald
Level 15
Level 15
Posts: 5548
Joined: Tue Jan 07, 2020 3:12 pm
Location: AZ, SSA (Squabbling States of America)

Re: GUI method to change ownership of a drive after formatting with GParted

Post by Lady Fitzgerald »

JoHubb wrote: Thu Aug 24, 2023 3:53 am
Lady Fitzgerald wrote: Wed Aug 23, 2023 10:31 am
JoHubb wrote: Wed Aug 23, 2023 3:00 am

I copied the entire contents of a NAS (around 6 TB) to an external HDD (16TB).
I used the Synology USB copy utility.

Everything has copied beautifully except everything is locked! If I had hair I'd tear it out.....
You've traveled out of my wheelhouse since I've never used a NAS. While it would be extreme and time consuming to redo your copy, have you tried using simple copy and paste or drag and drop to transfer data from the NAS to your external drive.?An even better way might be to use a folder/file syncing program, such as FreeFileSync, to copy your data over since it has the ability to be set to verify each file copy was done accurately and will give a report when finished if any files failed to copy over (which has been extremely rare for me).
I got sorted. If I had used FreeFileSync or something I might have avoided trouble. On the other hand, I have had bad experiences with backup utilities - ending up with files with strange file extensions which i cannot open! Without paying, that is!
I'm glad you got it sorted out! For the benefit of others reading this, how did you get it fixed?
Jeannie

To ensure the safety of your data, you have to be proactive, not reactive, so, back it up!
Aronstei
Level 2
Level 2
Posts: 76
Joined: Sun Aug 07, 2022 8:09 pm

Re: GUI method to change ownership of a drive afterThis method is much, much quicker than waiting fo formatting with GPa

Post by Aronstei »

Thank you very much Lady Fitzgerald!

I adapted your concept a follows.

In a terminal I entered...

Code: Select all

sudo nemo
  • Then I right clicked on my external USB drive which I had formatted with Gparted.
  • Then I changed the permissions from "root" to my username.
  • This method is much, much quicker than using gnome-disk-utility 42.0.

However, I don't need to follow the steps above to change the permissions from "root" to my username in case, after formatting my drive with GParted, I encrypt my drive with LUKS (Linux Unified Key Setup) by following these steps…

  • I simply press the Super key (aka Windows key), and then
  • I type “disks” to find gnome-disk-utility, and then
  • I use the GUI in gnome-disk-utility to encrypt the drive with LUKS.
... because, interestingly, the gnome-disk-utility encrypts the drive with LUKS and changes the permissions from "root" to my username.
Post Reply

Return to “Tutorials”