Hi all. Hardware is a new WD Blue 2TB disk in a portable USB case.
I have been trying to set it up using Systemd automount - following this guide
And this page as well
The drive has been partitioned using Fdisk. Then GParted was used to create btrfs file systems
for each of the partitions.
All partitions show in the Kde Removeable Devices when I boot. The usb device appears on the root file system as per the guide. Automount is working, as I can access partition 1 (for example) but I cannot write to it. So I have a permission problem it seems.
You describe being able to mount these partitions.
That has nothing to do with the read/write/access privileges of users or groups.
If you mount a regular ext4 usb to /media … /media will still be owned by root and the contents of the usb will still have the same permissions as it did when it was created. If you did not chown or chmod some directory for $USER to access, then only root would have rights.
Yes it is supposed to automount - when you access the disk using Systemd configs in
/etc/Systemd/system. I have tried chown the mount point - but no luck yet.
Hmmm
the tutorial asks for the disk to be mounted on the root file system - not in /home.
So I can see /usb (in the root directory tree) is owned by user.
But the next sub directory /wdblue is owned by root.
I may have to disable this mount by disable the systemd process
then try to chown - then try enable systemd again. I will try this.
Yes despite the sub-directory /wdblue being chown to user - it does not persist. the sub directory goes back to owner root.
My process
stop systemd xxxx.mount
disable systemd xxx.automount
All worked ok
Then chown /usb/wdblue to user. This part is not working yet.
I am now able to write to the USB hard drive as user. For example in Dolphin File Manager I can use the split window feature and drag files from “Home” to the drive.
Previously this was halted with “Permission Denied”.
I can attribute this to a couple of things.
Changing the file /etc/systemd/system/ xxxx.mount
to show “Options=user,uid=my userid”
After deleting the mount point in the file tree. I allowed the system to recreated it (done automagically by systemd) then applied
sudo chown -R owner:group /usb/xxx to the new mount point.