我正在尝试执行一个shell脚本:

#!/bin/sh
set -e

echo VMware Unlocker 1.2.0
echo ===============================
echo Copyright: Dave Parsons 2011-13

# Ensure we only use unmodified commands
export PATH=/bin:/sbin:/usr/bin:/usr/sbin

# Select correct patcher
echo Patching...
ARCH=`uname -m`
if [ "$ARCH" = 'x86_64' ]; then
    ./Unlocker.Linux64
else
    ./Unlocker.Linux32
fi

# Copy darwin.iso to tools folder
cp -v ../Tools/darwin.iso /usr/lib/vmware/isoimages
cp -v ../Tools/darwin.iso.sig /usr/lib/vmware/isoimages

echo Finished!


当我尝试执行它时,它一直在说:

Copyright: Dave Parsons 2011-13
Patching...
install.sh: 15: install.sh: ./Unlocker.Linux64: Permission denied


我尝试同时使用chown -Rchmod 775设置权限,但是权限不会更改。

drwx------ 1 bryan bryan     384 mar 29 17:44 .
drwx------ 1 bryan bryan     432 mar 29 17:18 ..
-rw------- 1 bryan bryan     508 mar 29 17:44 install.sh
-rw------- 1 bryan bryan     498 sep 19  2013 uninstall.sh
-rw------- 1 bryan bryan 1274692 sep 19  2013 Unlocker.Linux32
-rw------- 1 bryan bryan 1343792 sep 19  2013 Unlocker.Linux64

最佳答案

权限说您只能读/写文件,但不能执行:

chmod +x Unlocker.Linux32 Unlocker.Linux64

10-08 01:55