[wiki] HowTo - Access my second harddrive



Access my second harddrive

So you have installed Manjaro and you realize that your second disk is not writeable. You can access the data but you cannot change it.

The primary cause is permissions and those can be solved by this guide.

However the issue could also arise when you dualboot with Windows, and the partition you want to access is the Windows root partition. How to fix that is a matter for another HowTo.

Locate the device and partition(s).

$ lsblk
sda      8:0    0 223,6G  0 disk 
├─sda1   8:1    0   512M  0 part 
├─sda2   8:2    0    60G  0 part 
├─sda3   8:3    0   130G  0 part 
└─sda4   8:4    0  33,1G  0 part [SWAP]
sdb      8:16   0   477G  0 disk 
└─sdb1   8:17   0 419,1G

Make a permanent mountpoint.

Create a folder for the purpose (change all references to mydisk as you would want a more descriptive name).

sudo mkdir -p /media/mydisk

Mount the partition

Replace the Xy with the device and the partition number you found.

$ sudo mount /dev/sdXy /media/mydisk

Set owner

Recursive change owner on the folder structure. Manjaro uses a group with the same name as the user which you can verify with:

$ groups
sys lp wheel network video optical storage scanner power <user>
$ sudo chown -R user:group /media

Creating a permanent mountpoint for a partition

Folders are locked, can access to them but can’t delete permanently

Unable to access my secondary interal ssd on my laptop

Folders are locked, can access to them but can't delete permanently
Problems encountered after reformatting the /home partition
How to make partition table manually

Once mounted, you can just change the owner of the mount point.
$ sudo chown myusername /media/mydisk


Good idea to change the group ownership too.

sudo chown username:username /media/mydisk


Good point, groups can be used to limit access to the drive so you get per user or group writes.
Wait What, why do we no let root own the drive and give access to group only for the drives/partitions needed?


Because this it not the point.

The point is to get access to a drive you connect and the second point is to create an access point.


I had to put an entry in /etc/fstab for a mount point across rebooot? I fail to see how this tutorial actual does anything beyond the current session.
The title should be how to access second hard drive for one time only.
Or maybe you should put both tutorials into 1 and seal the deal.


You are absolutely right - my memory sometimes fails me -

This tutorial is all about access

It is also for the situations where for some reason the drive will not auto-mount and if it does you cannot access the content.