I am hoping someone might be able to help explain an issue I have with regards to directory permissions I am getting when trying to mount 2 external USB HDDs. For reference this is on Raspbian but I believe this to be a general linux/debian question.
First off I have created two mount points under /media/
pi@mypi:/media $ ls -l total 8 drwxr-xr-x 2 root root 4096 Jun 29 12:38 hdd drwxr-xr-x 2 root root 4096 Jun 29 12:37 hdd2
I then identified the UUID of the two disks I wanted to mount:
pi@mypi:/media $ sudo lsblk -f NAME FSTYPE LABEL UUID MOUNTPOINT sda ext4 HomeBackup 2e3ece57-6526-4acd-aba3-79f0937ecad0 sde └─sde1 ext4 HomeBackup2 f54dad28-04a8-4bad-9d84-38571b2e2155
Which I then used to update my
pi@mypi:/media $ cat /etc/fstab ... UUID=2e3ece57-6526-4acd-aba3-79f0937ecad0 /media/hdd ext4 noatime,nofail,defaults 0 0 UUID=f54dad28-04a8-4bad-9d84-38571b2e2155 /media/hdd2 ext4 noatime,nofail,defaults 0 0
However when I then mount the drives one of them is changed owner ship to my user
pi whilst the other one remains as owned by
root which makes no sense to me as the setup is identical for both of them..
pi@mypi:/media $ sudo mount -a pi@mypi:/media $ ls -l total 8 drwxrwxr-x 10 pi pi 4096 Jun 29 13:45 hdd drwxr-xr-x 3 root root 4096 Jun 29 12:29 hdd2
Please can someone help point out what I've missed here ?