我正在使用以下Bash脚本,但收到以下愚蠢的错误:
Fixing perms on /Volumes/Volume-B/IMAGES/Prostock scans/
chmod: Failed to set ACL on file '/Volumes/Volume-B/IMAGES/Prostock': No such file or directory
chmod: Failed to set ACL on file 'scans/': No such file or directory
chmod: Unknown tag type 'inherited'
这是我的剧本:
#!/bin/bash
PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH
DEST=/Volumes/Volume-B/IMAGES/Prostock\ scans/
echo Fixing perms on $DEST
chmod -R +a "user:administrator allow list,add_file,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" $DEST
chmod -R +a "user:icadmin inherited allow list,add_file,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown,file_inherit,directory_inherit" $DEST
echo Done!
注意我在“Prostock”之后使用和不使用反斜杠将$ DEST包装在单引号和双引号中并得到相同的错误。
建议最感激!
丹
答案 0 :(得分:1)
您是否尝试在$DEST
变量周围添加双引号?
chmod -R +a "user:icadmin inherited allow...." "$DEST"