Hi,
I use an external hard drive which stores media file pretty frequently. Normally I would use Dolphin (on KDE) to automatically mount the drive and open up the drive with no issues. One day I found out that somehow this drive was mounted as a read-only file system. A classic “it used to work fine but it doesn’t work now”.
So I’m wondering, how do I automatically mount the drive when I plug in it, with the read/write permissions for normal user, but without opening any file manager or typing any commands?
I’ve tried the following, based on the file system section on the manual:
# File systems
# for mounting external hard drive for now
fileSystems."/run/media/my-username/MyPassport" = {
device = "/dev/sda2";
fsType = "exfat";
options = ["nofail" "uid=1000" "gid=100" "dmask=007" "fmask=117" "user" "u+rwx" "g+rwx" "o+rwx"];
};
But:
- when I plugged in the hard drive, it didn’t seem to be mounted automatically.
- the mount point is correct but after mounted, its permissions were still:
drwxr-xr-x 2 root root 40 Oct 18 19:38 MyPassport
Can someone please help me on this?