文件的文件权限

时间:2015-03-29 15:47:20

标签: linux bash shell unix file-permissions

我试图执行一个shellcript:

#!/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 -R和chmod 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

1 个答案:

答案 0 :(得分:0)

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

chmod +x Unlocker.Linux32 Unlocker.Linux64