I have my primary (a NVME) and a secondary (Maxtor SSD) drive. I keep my work and some games in the second one.
When I boot or reboot to my system, which is KDE Plasma (version 5.25.2), my secondary drive, let's name it just "SSD", changes the behaviour of some programs and commands that deal with permissions, specifically writing executables in my case. Example: a script with #!/usr/bin/env node
won't execute, saying it doesn't have permission.
/bin/sh: Line 1: /mnt/ssd/node_project/node_modules/.bin/husky: No permission
If I unmount and then mount again, through KDE Partition Manager I can execute the script without any problems.
How can I solve this? I want to have my SSD mounted on boot without this problem.
This is my fstab after boot:
Neue Partition /mnt/spare sync,users
0 0 # /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=xxxx-xxxx /boot/efi vfat noatime 0 2
UUID=e23b109b-xxxx-xxxx-xxxx-xxxxxxxxxxxx / ext4 noatime 0 1
UUID=bbf248d3-xxxx-xxxx-xxxx-xxxxxxxxxxxx swap swap defaults 0 0
tmpfs /tmp tmpfs noatime,mode=1777 0 0
/dev/sdb1 /mnt/sdd ext4 users 0 0
And this is after unmount and mounting:
Neue Partition /mnt/spare sync,users 0 0 # /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <xxxx system> <mount point> <type> <options> <dump> <pass>
UUID=27C5-xxxx /boot/efi vfat noatime 0 2
UUID=e23b109b-xxxx-xxxx-xxxx-xxxxxxxxxxxx / ext4 noatime 0 1
UUID=bbf248d3-xxxx-xxxx-xxxx-xxxxxxxxxxxx swap swap defaults 0 0
tmpfs /tmp tmpfs noatime,mode=1777 0 0
/dev/sdb1 /mnt/ssd ext4 users 0 0
So, no difference. Same thing for permissions:
➜ ~ la /mnt/
insgesamt 4,0K
drwxrwxrwx 4 root root 4,0K 11. Jul 19:32 ssd
➜ ~ la /mnt/ssd
insgesamt 20K
drwxr-xr-x 3 stanley stanley 4,0K 11. Jul 14:58 ent
drwxrwxrwx 2 root root 16K 11. Jul 14:50 lost+found
After:
➜ ~ la /mnt/
insgesamt 4,0K
drwxrwxrwx 4 root root 4,0K 11. Jul 19:32 ssd
➜ ~ la /mnt/ssd
insgesamt 20K
drwxr-xr-x 3 stanley stanley 4,0K 11. Jul 14:58 ent
drwxrwxrwx 2 root root 16K 11. Jul 14:50 lost+found
When I created this new partition I selected "ext4" and permissions for "everyone" and I tried issuing chown $USER:$USER -R ssd/
to no avail. I'm no expert on this, and I couldn't find an answer, maybe my word was "off", I don't know.