You are not logged in.
Hi,
I added a 500GB HDD to my computer. I formatted it and partitioned it with `fdisk` (equal-sized partitions) and ran mkfs.ext4 on both partitions. When I mount the HDD with a file manager like Thunar or Dolphin (clicking on the HDD in the side panel under "Devices"), it requires me to enter my password. Inside the the HDD, when i right click, the "Create new" and "Paste" options are grayed-out and I can't copy files to it (basically, i can't edit the HDD).
Why isn't the HDD editable even though I entered my password? How can I to make the HDD editable? And is there a way to make the file managers to not require a password for mounting devices for my user?
I mostly care about making the HDD editable (the third question is not as important) and this is my first time messing with HDDs and storage in Linux.
Thanks in advance.
Last edited by iusearchbtwistaken (2024-01-15 17:58:58)
Offline
File system permissions on a linux file system are stored on the file system, and will normally be owned by the root user by default.
After mounting run
sudo chown myuser:mygroup /mount/pathand replace the relevant tokens with what's applicable to your system.
And maybe read: https://wiki.archlinux.org/title/File_p … attributes
For the third question. If it's a persistent HDD that you don't intend to move often, mount it in your fstab. you could create polkit rules so that you don't have to type the PW, but for something that's intended to be moved often the fstab is the canonical place. https://wiki.archlinux.org/title/Fstab
Offline
File system permissions on a linux file system are stored on the file system, and will normally be owned by the root user by default.
After mounting run
sudo chown myuser:mygroup /mount/pathand replace the relevant tokens with what's applicable to your system.
And maybe read: https://wiki.archlinux.org/title/File_p … attributes
For the third question. If it's a persistent HDD that you don't intend to move often, mount it in your fstab. you could create polkit rules so that you don't have to type the PW, but for something that's intended to be moved often the fstab is the canonical place. https://wiki.archlinux.org/title/Fstab
Thanks for the help. I initially thought that if i used `chown`, the permissions wouldn't persist after unmounting, but they do.
Last edited by iusearchbtwistaken (2024-01-15 21:38:23)
Offline
You'd be correct in that assumption if it's not a POSIX aware filesystem, like the FAT family or NTFS.
Offline