can not execute a script:permission denied, although it has the execution flag set (-rwxr-xr-x)

Peter Flynn peter at silmaril.ie
Thu Jan 20 08:34:34 UTC 2022


On 20 January 2022 06:46:17 robert rottermann <robert at redcor.ch> wrote:

> Hi there
>
> in a folder on my desktop with Ubuntu 20.04 i can not execute any script that
> has the execution flag set.
>
> But an attempt to run it, fails with an permission error:
>
> robert at chrissy:~/Dropbox/pankraz/SAPL$ ls -l startjava.sh
> -rwxr-xr-x 1 robert robert 574 Jan 20 00:27 startjava.sh
> robert at chrissy:~/Dropbox/pankraz/SAPL$ ./startjava.sh
> -bash: ./startjava.sh: Permission denied
>
>
> executing the same script using sh:
>
> sh ./startjava.sh
>
> works fine.
>
> What could be the reason?

What does the first line of the script say?

P

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20220120/dc741d6d/attachment.html>


More information about the ubuntu-users mailing list