2015-08-16 169 views
1

我不知道这是什么。我正试图归档我的应用程序。我知道有很多答案,但我无法理解任何答案。所以请有人知道如何解决这个问题可以告诉我。命令/ 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 

图像0​​https://drive.google.com/file/d/0B2z_d4wEKPEFVWsxV0xUczhFck0/view?usp=sharing

+0

该文件的权限是什么?您可以使用'ls -lO/Users/shriyarishi/Library/Developer/Xcode/DerivedData/QuoteU-cqodwskdmizaqjgavubtjxrtedhv/Build/Intermediates/ArchiveIntermediates/QuoteU/InstallationBuildProductsLocation/Applications/QuoteU.app'查看权限以及设置的任何标志文件。 –

+0

什么都没有发生@DanLowe – motivation1

+0

你是什么意思?那'ls'命令没有输出? –

回答

2

只有超级用户可以CHOWN文件。从chown(8)手册页:

出于显而易见的安全原因,文件的所有权只能 可以由超级用户更改。

如果您想更改文件所有权,您应该使用sudosudo将需要您的密码,并且您在计算机的admin组中(即您必须被标记为允许管理计算机)。

sudo /usr/sbin/chown -RH shivamrishi:staff \ 
    /Users/shriyarishi/Library/Developer/Xcode/DerivedData/QuoteU-cqodwskdmizaqjgavubtjxrtedhv/Build/Intermediates/ArchiveIntermediates/QuoteU/InstallationBuildProductsLocation/Applications/QuoteU.app 
+0

你能写一些代码吗? – motivation1

+0

您只需在命令行之前放置'sudo'命令即可。没有涉及的代码。 –

+0

@丹我使用sudo它给“非法组名”错误。我该如何解决这个问题? –

相关问题