Cannot execute binaries on extern hdd

Hi,

I have the following problem and I hope someone can help me. Thank you in advance. I can’t run programs from my external hard drive. So I checked the external hard drive with fsck and was able to detect and fix bugs. After a restart I still couldn’t start programs. So I connected the hard disk to another system with opensuse tumbleweed and there I could start the programs. I looked into the file /etc/mtab and found the following:


/dev/sdb1 /media/extern ext4 rw,nosuid,nodev,relatime 0 0
/dev/sdb1 /home/user/Downloads ext4 rw,nosuid,nodev,noexec,relatime 0 0

However, the file /etc/fstab contains the following:


UUID=1802f356-090b-4cee-a521-bf876cdde290 /media/extern ext4 users,atime,rw,nodev,exec,nosuid 0 0
/media/extern/home/user/Downloads /home/user/Downloads none user,bind 0 0

Why is the parameter noexec in /etc/mtab?


sudo blkid /dev/sdb1
/dev/sdb1: LABEL="external" UUID="1802f356-090b-4cee-a521-bf876cdde290" TYPE="ext4" PARTUUID="000277af-01"

It seems with as if the hard disk is still marked as faulty on one system.

Cheers
Björn

Your user have permissions for that directory?

Check UID since name does not count

The “user” mount option implies “noexec”. So on that “fstab” line with “user”, you need to add “exec” after the “user”. For example, change “user” to “user,exec”.

And think about it before you make that change. There’s a reason that “user” implies “noexec”.

Thank you. It works again.

I have changed the following in the file /etc/fstab:

UUID=1802f356-090b-4cee-a521-bf876cdde290 /media/extern ext4 users,atime,rw,nodev,exec,nosuid 0 0 
/media/extern/home/user/Downloads /home/user/Downloads none user,exec,bind 0 0