How do I set up permissions for a new hdd partition?  [Solved]

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
spring.snow
Posts: 24
Joined: Tue May 03, 2022 5:47 pm

How do I set up permissions for a new hdd partition?

#1 Post by spring.snow »

Greetings!

I've been having some trouble with a new hdd I'm trying to install with MX Linux and I would really like to learn how to set up new partitions myself, there are some things which I've found confusing related to this.

I have an hdd that is mounted in a storage device (with a controller) connected via USB 3.0. that I split it into 2 partitions:
-one large partition that will be encrypted, that I've formatted with VC into ext4 (doesn't show as ext4 in Gparted though) and one smaller partition that I've formatted with Gparted as ext4. The first one works once I set up the password with VC, it mounts fine as soon as I input the pass, even though it gets a weird name (like a string with random numbers), but I can write or modify folders on it.
-the second partition (labelled K) is shown in Thunar, but I can't modify anything on it, no R/R access or anything.

I thought I'd check the manual hoping there would be some tutorial on how to modify read/write access, on chapter 7.3 Permissions it does mention, right under CLI, external partitions, but the link for the MX/antix wiki there does not lead anywhere. It seems it would have been exactly what I'm looking for, but the page doesn't exist.
In chapter 2.6.2 there is an option "Enable mounting of internal drives by non-root users." that might help with this, but I would like to avoid it if possible. I don't want it to automatically mount any external drive without any password input. I kinda like that this is standard in MX.
I also found this link and tried to follow the instructions from the last comment, but those command line arguments don't seem to work on MX Linux.

Code: Select all

 #mount /dev/sdf2 /mount/point
#chown userName:GroupName /mount/point -R' 
Doing this in a console doesn't mount the disk at all so I am assuming the coding language is probably for a different distro. Since the partition has been formatted and labelled in GParted I thought if I mount it under /media/ in my user folder, it should fix the problem.

Could someone point me in the right direction here? How do I successfully set up R/R permissions on the second partition?
Any suggestions or learning tipps would be greatly appreciated, I would like to learn how to set up all these things in MX independently because I really like Linux, even though it's frustrating to feel clueless at times.

Code: Select all

System:    Kernel: 6.1.0-4mx-amd64 [6.1.11-1~mx21+1] x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-4mx-amd64 root=UUID=<filter> ro quiet splash 
           Desktop: Xfce 4.18.1 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.18.0 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.3_ahs_x64 Wildflower April 9  2022 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Desktop System: Gigabyte product: X570 AORUS MASTER v: -CF serial: <filter> 
           Mobo: Gigabyte model: X570 AORUS MASTER v: x.x serial: <filter> 
           UEFI: American Megatrends LLC. v: F33 date: 05/21/2021 
CPU:       Info: 16-Core (2-Die) model: AMD Ryzen 9 3950X bits: 64 type: MT MCP MCM arch: Zen 2 
           family: 17 (23) model-id: 71 (113) stepping: 0 microcode: 8701021 cache: L2: 8 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 224006 
           Speed: 1866 MHz min/max: 2200/3500 MHz boost: enabled Core speeds (MHz): 1: 1866 
           2: 2200 3: 2200 4: 2337 5: 2200 6: 2057 7: 3500 8: 2200 9: 2200 10: 2200 11: 1871 
           12: 2796 13: 1866 14: 2200 15: 2503 16: 2537 17: 2200 18: 2165 19: 3553 20: 2203 
           21: 2641 22: 2800 23: 2165 24: 2806 25: 2376 26: 2200 27: 2137 28: 2200 29: 2159 
           30: 2200 31: 2200 32: 2200 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: mmio_stale_data status: Not affected 
           Type: retbleed mitigation: untrained return thunk; SMT enabled with STIBP protection 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, STIBP: always-on, RSB 
           filling, PBRSB-eIBRS: Not affected 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: AMD Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] vendor: ASUSTeK driver: amdgpu 
           v: kernel bus-ID: 0b:00.0 chip-ID: 1002:73bf class-ID: 0300 
           Display: x11 server: X.Org 1.20.14 compositor: xfwm4 v: 4.18.0 driver: 
           loaded: amdgpu,ati unloaded: fbdev,modesetting,radeon,vesa display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") 
           s-diag: 582mm (22.9") 
           Monitor-1: DisplayPort-2 res: 1920x1080 dpi: 90 size: 544x303mm (21.4x11.9") 
           diag: 623mm (24.5") 
           OpenGL: 
           renderer: AMD Radeon RX 6800 XT (sienna_cichlid LLVM 14.0.5 DRM 3.49 6.1.0-4mx-amd64) 
           v: 4.6 Mesa 22.0.5 direct render: Yes 
Audio:     Device-1: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel v: kernel bus-ID: 0b:00.1 
           chip-ID: 1002:ab28 class-ID: 0403 
           Device-2: AMD Starship/Matisse HD Audio vendor: Gigabyte driver: snd_hda_intel 
           v: kernel bus-ID: 0d:00.4 chip-ID: 1022:1487 class-ID: 0403 
           Device-3: C-Media CM6631A Audio Processor type: USB 
           driver: hid-generic,snd-usb-audio,usbhid bus-ID: 3-6.3:8 chip-ID: 0d8c:0004 
           class-ID: 0300 
           Sound Server-1: ALSA v: k6.1.0-4mx-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel modules: wl bus-ID: 03:00.0 
           chip-ID: 8086:2723 class-ID: 0280 
           IF: wlan0 state: down mac: <filter> 
           Device-2: Intel I211 Gigabit Network vendor: Gigabyte driver: igb v: kernel port: e000 
           bus-ID: 04:00.0 chip-ID: 8086:1539 class-ID: 0200 
           IF: eth1 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-3: Realtek RTL8125 2.5GbE vendor: Gigabyte driver: r8169 v: kernel port: d000 
           bus-ID: 05:00.0 chip-ID: 10ec:8125 class-ID: 0200 
           IF: eth0 state: down mac: <filter> 
           IF-ID-1: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
Bluetooth: Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 3-5:7 
           chip-ID: 8087:0029 class-ID: e001 
           Report: hciconfig ID: hci0 rfk-id: 3 state: down bt-service: N/A rfk-block: 
           hardware: no software: yes address: <filter> 
           Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff link-mode: slave accept 
Drives:    Local Storage: total: 14.56 TiB used: 2.32 TiB (15.9%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 1TB size: 931.51 GiB 
           block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> 
           rev: 3B6Q scheme: GPT 
           ID-2: /dev/sdb maj-min: 8:16 vendor: Samsung model: SSD 860 PRO 512GB size: 476.94 GiB 
           block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> 
           rev: 2B6Q 
           ID-3: /dev/sdc maj-min: 8:32 vendor: Toshiba model: HDWD120 size: 1.82 TiB block-size: 
           physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter> 
           rev: ACF0 scheme: GPT 
           ID-4: /dev/sdd maj-min: 8:48 vendor: Crucial model: CT500MX500SSD1 size: 465.76 GiB 
           block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> 
           rev: 032 scheme: GPT 
           ID-5: /dev/sdf maj-min: 8:80 type: USB vendor: Western Digital model: WD120EFBX-68B0EN0 
           size: 10.91 TiB block-size: physical: 4096 B logical: 512 B type: HDD rpm: 7200 
           serial: <filter> scheme: GPT 
Partition: ID-1: / raw-size: 408.68 GiB size: 401.19 GiB (98.17%) used: 30.9 GiB (7.7%) fs: ext4 
           dev: /dev/sdd2 maj-min: 8:50 
           ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 274 KiB (0.1%) fs: vfat 
           dev: /dev/sdd1 maj-min: 8:49 
           ID-3: /home raw-size: 496.57 GiB size: 487.71 GiB (98.22%) used: 461.24 GiB (94.6%) 
           fs: ext4 dev: /dev/sdc2 maj-min: 8:34 
Swap:      Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 32.44 GiB used: 13.29 GiB (41.0%) priority: -2 
           dev: /dev/sdd3 maj-min: 8:51 
Sensors:   System Temperatures: cpu: 16.8 C mobo: N/A gpu: amdgpu temp: 56.0 C mem: 58.0 C 
           Fan Speeds (RPM): N/A gpu: amdgpu fan: 0 
Repos:     Packages: 2821 note: see --pkg apt: 2790 lib: 1563 flatpak: 31 
           No active apt repos in: /etc/apt/sources.list 
           No active apt repos in: /etc/apt/sources.list.d/atom.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/librewolf.list 
           1: deb [arch=amd64] http://deb.librewolf.net bullseye main
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://ftp.ntua.gr/pub/linux/mxlinux/mx/repo/ bullseye main non-free
           2: deb http://ftp.ntua.gr/pub/linux/mxlinux/mx/repo/ bullseye ahs
           Active apt repos in: /etc/apt/sources.list.d/signal-xenial-added-by-mxpi.list 
           1: deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main
Info:      Processes: 730 Uptime: 24d 18h 2m wakeups: 51 Memory: 31.29 GiB used: 21.06 GiB (67.3%) 
           Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Client: shell wrapper v: 5.1.4-release inxi: 3.3.06 
Boot Mode: UEFI
Last edited by spring.snow on Mon Jul 31, 2023 3:08 am, edited 1 time in total.

User avatar
towwire
Posts: 688
Joined: Fri Oct 15, 2010 12:15 pm

Re: How do I set up permissions for a new hdd partition?

#2 Post by towwire »

If you want to change the permissions on your data files, you can do this:

Code: Select all

sudo chown -R $USER:$USER /top-level/path/to/files
It is easier to fight for one's principles then to live up to them.

User avatar
CharlesV
Administrator
Posts: 7967
Joined: Sun Jul 07, 2019 5:11 pm

Re: How do I set up permissions for a new hdd partition?

#3 Post by CharlesV »

@spring.snow Please post your Quick System Info.
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
DukeComposed
Posts: 1505
Joined: Thu Mar 16, 2023 1:57 pm

Re: How do I set up permissions for a new hdd partition?

#4 Post by DukeComposed »

spring.snow wrote: Sun Jul 30, 2023 6:16 pm

Code: Select all

 #mount /dev/sdf2 /mount/point
#chown userName:GroupName /mount/point -R' 
Doing this in a console doesn't mount the disk at all so I am assuming the coding language is probably for a different distro. Since the partition has been formatted and labelled in GParted I thought if I mount it under /media/ in my user folder, it should fix the problem.

Could someone point me in the right direction here? How do I successfully set up R/R permissions on the second partition?
Any suggestions or learning tipps would be greatly appreciated, I would like to learn how to set up all these things in MX independently because I really like Linux, even though it's frustrating to feel clueless at times.
As towwire points out, I'm not sure you're running these commands correctly. If you type "#mount something" or "#chown something" into a terminal window, the # character tells the shell that the entire line is a comment and is not to be executed. If you really want to mount /dev/sdf2 to /mount/point, you'd run:

Code: Select all

sudo mkdir -p /mount/point
sudo mount /dev/sdf2 /mount/point
In order, "sudo" is the command that temporarily elevates your permissions to perform superuser actions. You can't do many low-level administration operations as a normal user, since that could allow people to break the system. "mkdir" makes directories, and "-p" will create any directories in the path that don't already exist. It's shorthand for "mkdir /mount", "mkdir /mount/point". With the "-p" flag, can create /path/to/someplace/deep/in/your/file/system in one command.

Similarly, "mount" will mount a device (/dev/sdf2) a mountpoint you've already created in the previous command. If you want to mount a partition as read-only, you'd run "mount -o ro /dev/sdf2 /mount/point".

Note that in UNIX and Linux, options like "-p" or "-o ro" always come after the command, but before the devices and path arguments. If you want to run a Linux command called "foo" that takes a "to" and a "from" argument, it would almost always work like this:

Code: Select all

foo to from
If "foo" takes a "-a" argument you want to include:

Code: Select all

foo -a to from
So if you've mounted your new partition and now want to set permissions on the files and directories on it so that everything is owned by "jim" and the user "jim" belongs to the group "family", you'd run:

Code: Select all

sudo chown -R jim:family /mount/point

User avatar
figueroa
Posts: 1106
Joined: Thu Dec 20, 2018 11:20 pm

Re: How do I set up permissions for a new hdd partition?

#5 Post by figueroa »

Three things happened when you used gparted. First the partition table was created. Then, within the partition table, you created partitions. After gparted creates the partition, it formats it according to your instructions, i.e. to be ext4. Creating the partition and formatting the partition are two separate processes, but for user convenience, gparted combines it, assuming that if the user creates a partition they will want it to be formatted.

But, gparted does not create an entry in /etc/fstab which instructs the system how to USE the partition. MX has a tool to help with that, but I've never used it. Here is how to create the entry in /etc/fstab using an example. You have to use root permission, and this will open /etc/fstab in the featherpad editor as root, but first make a copy of it with:

Code: Select all

cp /etc/fstab /etc/fstab.bak
Then:

Code: Select all

sudo featherpad /etc/fstab
Add a line that looks like:

Code: Select all

#was /dev/sdh2
UUID=d9eafa29-f10b-4212-b9ad-610067fbb59e	/mnt/backup3	ext4	user,noauto,noatime	0 2
The first line is a reminder to me what the kernel assigned device was called. However, using the kernel assigned device may be unreliable, so actually use the partition UUID. Use the command "blkid" which will show you the UUID of every partition.

Copy and paste the UUID number in place of the UUID number in my example, but do not use the quotes. Typos definitely will count against you here, and there are no quote marks in the /etc/fstab.

The next field is the mountpoint. Hard drive partitions should be mounted under the directory /mnt (/media is for removable drives according to convention). Create the mountpoint as root using:

Code: Select all

sudo mkdir /mnt/backup3
If you don't want to call the mountpoint /mnt/backup3, make it something else, but the mountpoint must match the mountpoint field in the /etc/fstab file.

The next field is the partition type. Yours is ext4 and you can just follow my example.

The next field, the fourth field, are mount options. As I have used them, they mean, 1. The user has permission to mount and unmount, 2. The partition is not automatically mounted at boot, 3. noatime improves system performance and reduces the number of writes. Separate the options with commas and do not include any spaces, just like in the example.

The last two fields are numbers. Use what I used in my example. They are 1. dump and 2. pass number. You can read about this with the manual command in the terminal, "man fstab" which you should actually look through for edification.

Save the file /etc/fstab, then open Thunar and you should be able to mount the partition by clicking on it.
Andy Figueroa
Using Unix from 1984; GNU/Linux from 1993

MXRobo
Posts: 1840
Joined: Thu Nov 14, 2019 12:09 pm

Re: How do I set up permissions for a new hdd partition?

#6 Post by MXRobo »

@spring.snow
Small note: If you open a terminal you'll notice that it opens by default with a "$" symbol meaning that you are logged in as a user.
If you see the hash "#" symbol, it means that you're logged in as root.
However, I assume that since logging in as the user is more common, some people place the hash symbol in the code to indicate that this needs to be done as root;
I believe that's what they were doing in the link that you provided.
As user or root, I don't think that you ever, or usually start a command beginning with the hash symbol, and I wouldn't include it in the code either.

Also note, that if you view your fstab with cat etc/fstab/ it probably states:
# Pluggable devices are handled by uDev, they are not in fstab
I don't know this stuff, but you MAY have do something different, maybe search the forum for something like:
how to setup external drive, external ssd, external hard drive, external, or something to that effect – or wait for more knowledge and assistance.

I have no idea if Disk Manager will help or not, I don't know if it works on /etc/fstab only, or external drives.
Personally, I'm not too familiar with it.
Good Luck.

User avatar
pbear
Posts: 311
Joined: Tue Aug 09, 2022 9:24 pm

Re: How do I set up permissions for a new hdd partition?

#7 Post by pbear »

spring.snow wrote: Sun Jul 30, 2023 6:16 pm ... I'm trying to install with MX Linux
Are you planning to run MX from the enclosure? Or is the plan to install that way, then swap into another computer as an internal drive? Also, are you planning to install to the encrypted or non-excrypted partition?

By the way, I think MXRobo is correct. The # you're seeing in the LinuxQuestions thread isn't supposed to be part of the command; it's a way of indicating the command should be run as user-root. On which point, I strongly encourage you to get in the habit of using sudo all the time. If a source gives user-root forms of command, translate them to sudo form before running.

spring.snow
Posts: 24
Joined: Tue May 03, 2022 5:47 pm

Re: How do I set up permissions for a new hdd partition?

#8 Post by spring.snow »

towwire wrote: Sun Jul 30, 2023 7:39 pm If you want to change the permissions on your data files, you can do this:

Code: Select all

sudo chown -R $USER:$USER /top-level/path/to/files
Does this work on an entire partition? Because with Thunar I can't modify any of the folder properties, I assume I have to do something else for the entire partition.
CharlesV wrote: Sun Jul 30, 2023 8:18 pm @spring.snow Please post your Quick System Info.
Editing it into master post.
DukeComposed wrote: Sun Jul 30, 2023 9:08 pm
As towwire points out, I'm not sure you're running these commands correctly. If you type "#mount something" or "#chown something" into a terminal window, the # character tells the shell that the entire line is a comment and is not to be executed. If you really want to mount /dev/sdf2 to /mount/point, you'd run:

Code: Select all

sudo mkdir -p /mount/point
sudo mount /dev/sdf2 /mount/point
In order, "sudo" is the command that temporarily elevates your permissions to perform superuser actions. You can't do many low-level administration operations as a normal user, since that could allow people to break the system. "mkdir" makes directories, and "-p" will create any directories in the path that don't already exist. It's shorthand for "mkdir /mount", "mkdir /mount/point". With the "-p" flag, can create /path/to/someplace/deep/in/your/file/system in one command.

Similarly, "mount" will mount a device (/dev/sdf2) a mountpoint you've already created in the previous command. If you want to mount a partition as read-only, you'd run "mount -o ro /dev/sdf2 /mount/point".

So if you've mounted your new partition and now want to set permissions on the files and directories on it so that everything is owned by "jim" and the user "jim" belongs to the group "family", you'd run:

Code: Select all

sudo chown -R jim:family /mount/point
Thank you very much! I'll try this out.
One thing: not quite sure what I should be adding for the group name, I don't have any group created just one main user, haven't changed anything else. I'm afraid to create a new one cause I already have some apps installed that have a group assigned to them, so I don't want to mess up permissions all over again.
figueroa wrote: Sun Jul 30, 2023 11:17 pm
But, gparted does not create an entry in /etc/fstab which instructs the system how to USE the partition. MX has a tool to help with that, but I've never used it. Here is how to create the entry in /etc/fstab using an example. You have to use root permission, and this will open /etc/fstab in the featherpad editor as root, but first make a copy of it with:

Code: Select all

cp /etc/fstab /etc/fstab.bak
Then:

Code: Select all

sudo featherpad /etc/fstab
Add a line that looks like:

Code: Select all

#was /dev/sdh2
UUID=d9eafa29-f10b-4212-b9ad-610067fbb59e	/mnt/backup3	ext4	user,noauto,noatime	0 2
The first line is a reminder to me what the kernel assigned device was called. However, using the kernel assigned device may be unreliable, so actually use the partition UUID. Use the command "blkid" which will show you the UUID of every partition.

Copy and paste the UUID number in place of the UUID number in my example, but do not use the quotes. Typos definitely will count against you here, and there are no quote marks in the /etc/fstab.

The next field is the mountpoint. Hard drive partitions should be mounted under the directory /mnt (/media is for removable drives according to convention). Create the mountpoint as root using:

Code: Select all

sudo mkdir /mnt/backup3
If you don't want to call the mountpoint /mnt/backup3, make it something else, but the mountpoint must match the mountpoint field in the /etc/fstab file.

The next field is the partition type. Yours is ext4 and you can just follow my example.

The next field, the fourth field, are mount options. As I have used them, they mean, 1. The user has permission to mount and unmount, 2. The partition is not automatically mounted at boot, 3. noatime improves system performance and reduces the number of writes. Separate the options with commas and do not include any spaces, just like in the example.

The last two fields are numbers. Use what I used in my example. They are 1. dump and 2. pass number. You can read about this with the manual command in the terminal, "man fstab" which you should actually look through for edification.

Save the file /etc/fstab, then open Thunar and you should be able to mount the partition by clicking on it.
That explains a lot, thank you for the detailed input! Should I do this in addition to the steps @DukeComposed mentioned? "user,noauto,noatime" are these arguments not going to be used by default when the partition is mounted?

Another thing, I believe @MXRobo has a very good point here: What if the partition is an external one? Does that mean I have to do it differently? Cause the drive is in an external enclosure connected via USB 3.0.

@pbear I have MX installed on a small SSD, the external partition is just mostly for storage, portable if need be.

User avatar
Buck Fankers
Posts: 770
Joined: Sat Mar 10, 2018 8:06 pm

Re: How do I set up permissions for a new hdd partition?

#9 Post by Buck Fankers »

spring.snow wrote: Mon Jul 31, 2023 3:08 am
towwire wrote: Sun Jul 30, 2023 7:39 pm If you want to change the permissions on your data files, you can do this:

Code: Select all

sudo chown -R $USER:$USER /top-level/path/to/files
Does this work on an entire partition? Because with Thunar I can't modify any of the folder properties, I assume I have to do something else for the entire partition.
Yes, whole partition.
For example, my data partition is on: /media/mx/data/

So I run this command:
sudo chown -R $USER:$USER /media/mx/data/
P.s.
It is my understanding that, for better stability/work of file system, there should be one file on that partition, called: lost+found that is owned by root. When you get access, maybe you need to restart computer first, open Thunar, right click on partition and create this file: lost+found

Then run this command: (with Thunar open terminal, where you created this file (in Thunar go to File and pick: Open Terminal Here )
then run this command:
sudo chown root:root lost+found
You can of course run this command from everywhere if you provide whole path to it. In my case it is like this:
sudo chown root:root /media/mx/data/lost+found

BitterTruth
Posts: 732
Joined: Tue Sep 22, 2020 7:36 pm

Re: How do I set up permissions for a new hdd partition?

#10 Post by BitterTruth »

Do it in the GUI.

1) Use gnome-disk-utility. Install it if it isn't.
2) disable automounting in removable drives and media

gnome-disks utility is much easier to use than gparted. Very intuitive.

Create/delete partitions using +/. Format is easy. Gives you the option to encrypt and password protect at time of creation in an easy manner. Use the gear icon to edit the encryption options
forum2.png
forum3.png
forum1.png
I even use it to create isos (3 dots up in the right corner ------> restore disk image-----select my iso------>done)
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “MX Help”