1

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.

0

1 Answer 1

1

According to man mount the user and users options imply noexec:

This option implies the options noexec, nosuid, and nodev

You could try to explicitly add the exec option to your fstab entry, e.g. user, exec

2
  • 1
    Just an update: users is indeed a valid mount option, you can see here: man.archlinux.org/man/mount.8, under "FILESYSTEM-INDEPENDENT MOUNT OPTIONS" section. The difference between user and users is: "Only the user that mounted a filesystem can unmount it again. If any user should be able to unmount, then use users instead of user in the fstab line". So, what did the trick was the "exec" option. Commented Jul 17, 2022 at 21:35
  • 1
    @RickStanley thanks for the info, I was not aware of that. man says for both user and users: This option implies the options noexec, nosuid, and nodev. I was not aware that these options would override defaults, which would imply exec Commented Jul 18, 2022 at 6:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .