New SATA drive - chown is obvious but gibberish to me
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
New SATA drive - chown is obvious but gibberish to me
Just added a new drive, and its owner is root, so I can do nothing with it. I have partitioned it and formatted it with gparted, and changed its displayed labels with the disks tool. But I do not see any graphical way to grab ownership of the disks. here is my fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda5 during installation
UUID=71e07b8c-a134-479d-8d1b-438da18ff997 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=982d2a42-9c69-4262-b5cf-82af5b8ec70e none swap sw 0 0
/dev/disk/by-uuid/2E809C1A809BE71D /mnt/2E809C1A809BE71D auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/5B282A5803110126 /mnt/5B282A5803110126 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/56F01CF1F01CD957 /mnt/56F01CF1F01CD957 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-id/wwn-0x50014ee6aecee175-part1 /mnt/wwn-0x50014ee6aecee175-part1 auto nosuid,nodev,nofail,noauto,x-gvfs-show 0 0
/dev/disk/by-id/wwn-0x50014ee6aecee175-part2 /mnt/wwn-0x50014ee6aecee175-part2 auto nosuid,nodev,nofail,noauto,x-gvfs-show 0 0
/dev/disk/by-uuid/20EB30C04E7D01B4 /mnt/20EB30C04E7D01B4 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/363D179A5F47C759 /mnt/363D179A5F47C759 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/105462331816116C /mnt/105462331816116C auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/b25ddf96-5606-44a0-8a01-9fdcc846a5cf /mnt/b25ddf96-5606-44a0-8a01-9fdcc846a5cf auto nosuid,nodev,nofail,x-gvfs-show 0 0
where do I go from here?
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda5 during installation
UUID=71e07b8c-a134-479d-8d1b-438da18ff997 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=982d2a42-9c69-4262-b5cf-82af5b8ec70e none swap sw 0 0
/dev/disk/by-uuid/2E809C1A809BE71D /mnt/2E809C1A809BE71D auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/5B282A5803110126 /mnt/5B282A5803110126 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/56F01CF1F01CD957 /mnt/56F01CF1F01CD957 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-id/wwn-0x50014ee6aecee175-part1 /mnt/wwn-0x50014ee6aecee175-part1 auto nosuid,nodev,nofail,noauto,x-gvfs-show 0 0
/dev/disk/by-id/wwn-0x50014ee6aecee175-part2 /mnt/wwn-0x50014ee6aecee175-part2 auto nosuid,nodev,nofail,noauto,x-gvfs-show 0 0
/dev/disk/by-uuid/20EB30C04E7D01B4 /mnt/20EB30C04E7D01B4 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/363D179A5F47C759 /mnt/363D179A5F47C759 auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/105462331816116C /mnt/105462331816116C auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/b25ddf96-5606-44a0-8a01-9fdcc846a5cf /mnt/b25ddf96-5606-44a0-8a01-9fdcc846a5cf auto nosuid,nodev,nofail,x-gvfs-show 0 0
where do I go from here?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- Elmar
Dual boot win 10 & Linux Mint
Release Linux Mint 21.3 Virginia 64-bit
Kernel Linux 5.15.0-91-generic x86_64
MATE 1.26.0
Dual boot win 10 & Linux Mint
Release Linux Mint 21.3 Virginia 64-bit
Kernel Linux 5.15.0-91-generic x86_64
MATE 1.26.0
-
- Level 12
- Posts: 4285
- Joined: Tue May 28, 2019 4:27 pm
Re: New SATA drive - chown is obvious but gibberish to me
You could try adding
gid=1000
which would give your group access.
for instance
/dev/disk/by-uuid/2E809C1A809BE71D /mnt/2E809C1A809BE71D auto nosuid,nodev,nofail,x-gvfs-show,gid=1000 0 0
gid=1000
which would give your group access.
for instance
/dev/disk/by-uuid/2E809C1A809BE71D /mnt/2E809C1A809BE71D auto nosuid,nodev,nofail,x-gvfs-show,gid=1000 0 0
Re: New SATA drive - chown is obvious but gibberish to me
You need to take ownership of the mountpoint which is in /mnt
If it is the last drive listed in fstab then:
Copy/Paste the following into a terminal:
Don't substitute your user name for $USER:$USER, leave that as is
If it is the last drive listed in fstab then:
Copy/Paste the following into a terminal:
Code: Select all
sudo chown -R $USER:$USER /mnt/b25ddf96-5606-44a0-8a01-9fdcc846a5cf
Everything in life was difficult before it became easy.
Solved! Re: New SATA drive - chown is obvious but gibberish to me
thank you - that did it. Magical incantations for linux!
- Elmar
Dual boot win 10 & Linux Mint
Release Linux Mint 21.3 Virginia 64-bit
Kernel Linux 5.15.0-91-generic x86_64
MATE 1.26.0
Dual boot win 10 & Linux Mint
Release Linux Mint 21.3 Virginia 64-bit
Kernel Linux 5.15.0-91-generic x86_64
MATE 1.26.0
Re: New SATA drive - chown is obvious but gibberish to me
Here is how it unfolds:
sudo - allows you to execute actions with root priviledge
chown - is the action=change owner and group
-R - apply the changes recursively to all directories/files contained
$USER:$USER - the new owner will be the currently logged-in owner/group
/mnt/b25ddf96-5606-44a0-8a01-9fdcc846a5cf This is the location and file-name in which to apply the changes.
This info was contained in your fstab file shown in your first post--kudos
sudo - allows you to execute actions with root priviledge
chown - is the action=change owner and group
-R - apply the changes recursively to all directories/files contained
$USER:$USER - the new owner will be the currently logged-in owner/group
/mnt/b25ddf96-5606-44a0-8a01-9fdcc846a5cf This is the location and file-name in which to apply the changes.
This info was contained in your fstab file shown in your first post--kudos
Everything in life was difficult before it became easy.
Re: New SATA drive - chown is obvious but gibberish to me
And you can simplify your fstab by replacing entries like
with
Code: Select all
/dev/disk/by-uuid/2E809C1A809BE71D
Code: Select all
UUID=2E809C1A809BE71D
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Re: New SATA drive - chown is obvious but gibberish to me
As noted, that worked on the new drive, but in followup, and I don't know how this changed, my previous drive, which I resized some partitions on, now has everything owned by root! So I tried the same incantationall41 wrote: ⤴Sat Jun 22, 2019 5:17 pm You need to take ownership of the mountpoint which is in /mnt
If it is the last drive listed in fstab then:
Copy/Paste the following into a terminal:Don't substitute your user name for $USER:$USER, leave that as isCode: Select all
sudo chown -R $USER:$USER /mnt/b25ddf96-5606-44a0-8a01-9fdcc846a5cf
Code: Select all
sudo chown -R $USER:$USER /mnt/363D179A5F47C759
- Elmar
Dual boot win 10 & Linux Mint
Release Linux Mint 21.3 Virginia 64-bit
Kernel Linux 5.15.0-91-generic x86_64
MATE 1.26.0
Dual boot win 10 & Linux Mint
Release Linux Mint 21.3 Virginia 64-bit
Kernel Linux 5.15.0-91-generic x86_64
MATE 1.26.0
Re: New SATA drive - chown is obvious but gibberish to me
I would remove all those 'messy' entries in fstab, presumably created by disks and do it manually. This also means that you can define more useful or meaningful mount points.
If it is an ext4 partition then the entry would be of the form
where
If it is an ntfs partition, try the above replacing ext4 with ntfs, but if you find it is read only then use:
windows_names just stops linux writing filenames to the partition that windows doesn't understand, the uid and gid bit is assigning ownership of the partition to you.
If your drives are removable you an add the
Suggest you do it one-by-one and check each works instead of changing them all at once.
If it is an ext4 partition then the entry would be of the form
Code: Select all
UUID=xxx /where_you_want_to_mount ext4 defaults 0 0
xxx
is the UUID of the partition which you find from the output of blkid
. Meaningful names - as an example, I used to have an ntfs partition which I shared with win7 in dual boot, in win it was D:, in linux I mounted it as /home/me/data
.If it is an ntfs partition, try the above replacing ext4 with ntfs, but if you find it is read only then use:
Code: Select all
UUID=whatever_it_is /your_mnt_pt ntfs windows_names,uid=1000,gid=1000,defaults 0 0
If your drives are removable you an add the
nofail
option. This stops linux trying to find the partition if not present (and incurring a 90 second delay in boot). You can choose whether to automount at boot or not (noauto
option). The normal convention is that fixed drives/partitions are normally mounted in /mnt
and removable drives in /media
, but you don't have to. If you do use the 'default' folders you can still use meaningful names like /mnt/mydata
instead of /mnt/b25ddf96-5606-44a0-8a01-9fdcc846a5cf
.Suggest you do it one-by-one and check each works instead of changing them all at once.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Re: New SATA drive - chown is obvious but gibberish to me
And you can make everything considerably more user-friendly by giving the partitions LABELs (w/gparted, on unmounted partitions). My fstab looks like:AndyMH wrote: ⤴Sun Jun 23, 2019 5:31 am And you can simplify your fstab by replacing entries likewithCode: Select all
/dev/disk/by-uuid/2E809C1A809BE71D
Code: Select all
UUID=2E809C1A809BE71D
Code: Select all
LABEL=MINT / ext4 errors=remount-ro 0 1
LABEL=DATA /mnt/DATA ext4 defaults,user,exec,noatime 0 2
LABEL=MANO /mnt/MANO ext4 defaults,noauto,user,noatime 0 2
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: New SATA drive - chown is obvious but gibberish to me
Wow - that is a lot to digest The drive in question is formatted NTFS, and has 2 partitions (D & E). My fstab (as noted above) has a bunch of entries that don't seem to correspond to anything physical. Physically, I have 3 SATA drives:
the first is the boot drive partitioned in half, with one half being the win 7 boot (ntfs), and the other being the mint boot (ext4). The second drive now has 2 partitions, both NTFS, in windows they are D: (Games) and E: (data). The third disk is likewise partitioned into 2, one being NTFS (drive F:), and the other EXT4. Now I know that there are tiny bits at the various ends of partitions, but why they end up in /mnt is beyond me. What data can I post that will help me "simplify" my fstab? Thanks all, btw.
the first is the boot drive partitioned in half, with one half being the win 7 boot (ntfs), and the other being the mint boot (ext4). The second drive now has 2 partitions, both NTFS, in windows they are D: (Games) and E: (data). The third disk is likewise partitioned into 2, one being NTFS (drive F:), and the other EXT4. Now I know that there are tiny bits at the various ends of partitions, but why they end up in /mnt is beyond me. What data can I post that will help me "simplify" my fstab? Thanks all, btw.
- Elmar
Dual boot win 10 & Linux Mint
Release Linux Mint 21.3 Virginia 64-bit
Kernel Linux 5.15.0-91-generic x86_64
MATE 1.26.0
Dual boot win 10 & Linux Mint
Release Linux Mint 21.3 Virginia 64-bit
Kernel Linux 5.15.0-91-generic x86_64
MATE 1.26.0
- slipstick
- Level 6
- Posts: 1071
- Joined: Sun Oct 21, 2012 9:56 pm
- Location: Somewhere on the /LL0 scale
Re: New SATA drive - chown is obvious but gibberish to me
Here is some info on fstab - hope this helps:
https://help.ubuntu.com/community/Fstab
viewtopic.php?p=1455937#p1455937
https://unix.stackexchange.com/question ... le-manager
https://help.ubuntu.com/community/Fstab
viewtopic.php?p=1455937#p1455937
https://unix.stackexchange.com/question ... le-manager
In theory, theory and practice are the same. In practice, they ain't.
- ricardogroetaers
- Level 6
- Posts: 1372
- Joined: Sat Oct 27, 2018 3:06 am
- Location: Rio de Janeiro, Brasil
Re: New SATA drive - chown is obvious but gibberish to me
Do not complicate!elmarts wrote: ⤴Sat Jun 22, 2019 3:10 pm Just added a new drive, and its owner is root, so I can do nothing with it. I have partitioned it and formatted it with gparted .......... here is my fstab
where do I go from here? .......Wow - that is a lot to digest ....... What data can I post that will help me "simplify" my fstab?....
To start organizing, post output the commands:
lsblk -f
sudo parted -l
Re: New SATA drive - chown is obvious but gibberish to me
OK - as follows, although I read that ntfs disks always show root as owner, and don't allow you to change this. Am I just barking up the wrong tree?
sudo parted -l
[sudo] password for ets:
Model: ATA ADATA SP550 (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 32.8kB 120GB 120GB primary ntfs boot
2 120GB 240GB 120GB extended
5 120GB 223GB 103GB logical ext4
6 223GB 240GB 17.1GB logical linux-swap(v1)
Model: ATA WDC WD1001FALS-0 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
3 1049kB 370GB 370GB primary ntfs
2 370GB 1000GB 630GB primary ntfs
Model: ATA Hitachi HUA72107 (scsi)
Disk /dev/sdc: 750GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 411GB 411GB primary ntfs
2 411GB 750GB 339GB primary ext4
lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ntfs Windows 64 bit A0A8882AA88800D0
├─sda2
├─sda5 ext4 71e07b8c-a134-479d-8d1b-438da18ff997 /
└─sda6 swap 982d2a42-9c69-4262-b5cf-82af5b8ec70e [SWAP]
sdb
├─sdb2 ntfs Games 5B282A5803110126 /mnt/5B282A580
└─sdb3 ntfs Data 363D179A5F47C759 /mnt/363D179A5
sdc
├─sdc1 ntfs Drive_F 105462331816116C /mnt/105462331
└─sdc2 ext4 Linux b25ddf96-5606-44a0-8a01-9fdcc846a5cf /mnt/b25ddf96-
sr0
sudo parted -l
[sudo] password for ets:
Model: ATA ADATA SP550 (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 32.8kB 120GB 120GB primary ntfs boot
2 120GB 240GB 120GB extended
5 120GB 223GB 103GB logical ext4
6 223GB 240GB 17.1GB logical linux-swap(v1)
Model: ATA WDC WD1001FALS-0 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
3 1049kB 370GB 370GB primary ntfs
2 370GB 1000GB 630GB primary ntfs
Model: ATA Hitachi HUA72107 (scsi)
Disk /dev/sdc: 750GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 411GB 411GB primary ntfs
2 411GB 750GB 339GB primary ext4
lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ntfs Windows 64 bit A0A8882AA88800D0
├─sda2
├─sda5 ext4 71e07b8c-a134-479d-8d1b-438da18ff997 /
└─sda6 swap 982d2a42-9c69-4262-b5cf-82af5b8ec70e [SWAP]
sdb
├─sdb2 ntfs Games 5B282A5803110126 /mnt/5B282A580
└─sdb3 ntfs Data 363D179A5F47C759 /mnt/363D179A5
sdc
├─sdc1 ntfs Drive_F 105462331816116C /mnt/105462331
└─sdc2 ext4 Linux b25ddf96-5606-44a0-8a01-9fdcc846a5cf /mnt/b25ddf96-
sr0
- Elmar
Dual boot win 10 & Linux Mint
Release Linux Mint 21.3 Virginia 64-bit
Kernel Linux 5.15.0-91-generic x86_64
MATE 1.26.0
Dual boot win 10 & Linux Mint
Release Linux Mint 21.3 Virginia 64-bit
Kernel Linux 5.15.0-91-generic x86_64
MATE 1.26.0
- ricardogroetaers
- Level 6
- Posts: 1372
- Joined: Sat Oct 27, 2018 3:06 am
- Location: Rio de Janeiro, Brasil
Re: New SATA drive - chown is obvious but gibberish to me
Excuse me. I forgot to ask for the output of the command:
id
id