linux 执行脚本permission denied,可执行脚本在Linux机器上获得权限被拒绝(Executable script gets permission denied on Linux ...

可执行脚本在Linux机器上获得权限被拒绝(Executable script gets permission denied on Linux box)

试图在Ubuntu 14.04上运行脚本。

$ bash MirroirHome

运行正常

$ ./MirroirHome

bash: ./MirroirHome: Permission denied

$ ls -l

total 32

-rwxr-xr-x 1 gerald gerald 214 nov 14 15:44 MirroirHome

我是文件的所有者,权限位是打开的,发生了什么?

这是脚本,如果它很重要。

#!/bin/bash

rsync \

--archive \

--verbose \

--compress \

--update \

--delete \

/home/ /media/Data/MirroirHome

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??

你可能感兴趣的:(linux,执行脚本permission,denied)