命令/ usr/sbin/chown失败,退出代码为1(xcode6)
问题描述:
我不知道这是什么。我正试图归档我的应用程序。我知道有很多答案,但我无法理解任何答案。所以请有人知道如何解决这个问题可以告诉我。命令/ usr/sbin/chown失败,退出代码为1(xcode6)
SetOwnerAndGroup shivamrishi:staff /Users/shriyarishi/Library/Developer/Xcode/DerivedData/QuoteU-cqodwskdmizaqjgavubtjxrtedhv/Build/Intermediates/ArchiveIntermediates/QuoteU/InstallationBuildProductsLocation/Applications/QuoteU.app
cd "/Users/shriyarishi/Desktop/QuoteU "
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/usr/sbin/chown -RH shivamrishi:staff /Users/shriyarishi/Library/Developer/Xcode/DerivedData/QuoteU-cqodwskdmizaqjgavubtjxrtedhv/Build/Intermediates/ArchiveIntermediates/QuoteU/InstallationBuildProductsLocation/Applications/QuoteU.app
最后一个码
chown: /Users/shriyarishi/Library/Developer/Xcode/DerivedData/QuoteU-cqodwskdmizaqjgavubtjxrtedhv/Build/Intermediates/ArchiveIntermediates/QuoteU/InstallationBuildProductsLocation/Applications/QuoteU.app: Operation not permitted
Command /usr/sbin/chown failed with exit code 1
图像0https://drive.google.com/file/d/0B2z_d4wEKPEFVWsxV0xUczhFck0/view?usp=sharing
答
只有超级用户可以CHOWN文件。从chown(8)
手册页:
出于显而易见的安全原因,文件的所有权只能 可以由超级用户更改。
如果您想更改文件所有权,您应该使用sudo
。 sudo
将需要您的密码,并且您在计算机的admin
组中(即您必须被标记为允许管理计算机)。
sudo /usr/sbin/chown -RH shivamrishi:staff \
/Users/shriyarishi/Library/Developer/Xcode/DerivedData/QuoteU-cqodwskdmizaqjgavubtjxrtedhv/Build/Intermediates/ArchiveIntermediates/QuoteU/InstallationBuildProductsLocation/Applications/QuoteU.app
该文件的权限是什么?您可以使用'ls -lO/Users/shriyarishi/Library/Developer/Xcode/DerivedData/QuoteU-cqodwskdmizaqjgavubtjxrtedhv/Build/Intermediates/ArchiveIntermediates/QuoteU/InstallationBuildProductsLocation/Applications/QuoteU.app'查看权限以及设置的任何标志文件。 –
什么都没有发生@DanLowe – motivation1
你是什么意思?那'ls'命令没有输出? –