trying to run a script on Ubuntu 14.04.
$ bash MirroirHome
runs fine
but
$ ./MirroirHome
bash: ./MirroirHome: Permission denied
$ ls -l
total 32
-rwxr-xr-x 1 gerald gerald 214 nov 14 15:44 MirroirHome
I am the owner of the file and the permission bit is on, what is going on??
Here is the script in case it matters.
#!/bin/bash
rsync \
--archive \
--verbose \
--compress \
--update \
--delete \
/home/ /media/Data/MirroirHome
This can happen if the partition is mounted with the noexec
flag on. You can verify this by running mount
: find the partition in the output, and in the list of flags, probably there will be noexec
.
To resolve this, remount the partition without the noexec
flag. Or, copy the script to another partition that's already mounted without noexec
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With