can not execute a script:permission denied, although it has the execution flag set (-rwxr-xr-x)
Colin Watson
cjwatson at ubuntu.com
Thu Jan 20 18:56:36 UTC 2022
On Thu, Jan 20, 2022 at 02:26:49PM +0100, robert rottermann wrote:
> On 20.01.22 12:30, Colin Watson wrote:
> > It's probably in a filesystem that's mounted with the noexec option.
> > The output of "findmnt --target ." in that directory should tell you if
> > that's the case.
>
> You are perfectly right
> following is the output of the above command.
>
> /3t_disk /dev/sda1 ext4 rw,nosuid,nodev,noexec,relatime,errors=remount-ro
>
>
> However I do not understan why this is so. Following is the relative entry
> in the fstab:
>
> UUID=2a0d1320-6f96-4e09-8b25-959b5db42e57 /3t_disk ext4
> users,errors=remount-ro 0 1
>
>
> does users imply this?
Yes, see "man mount":
This option implies the options noexec, nosuid, and nodev (unless
overridden by subsequent options, as in the option line
users,exec,dev,suid).
> What should I add to allow execution of scripts.
Minimally, change "users" to "users,exec". You might also consider
whether you actually need non-root users to be able to mount/unmount
this filesystem; perhaps replacing "users" with "nodev,nosuid" would be
better.
--
Colin Watson (he/him) [cjwatson at ubuntu.com]
More information about the ubuntu-users
mailing list