"Command /usr/sbin/chown failed with exit code 1" when Archiving

IosXcodeChown

Ios Problem Overview


I am trying to archive my first iOS 4.3 Application for iPhone and I always encounter this error:

Command /usr/sbin/chown failed with exit code 1

I have searched through various forums, trying solutions such as changing the Alternate Install Group (which I don't know what to change to), and turning on 'Skip Install'.

Ios Solutions


Solution 1 - Ios

As dumb as it sounds, in XCode 5.1.1, all I had to do was quit out and restart XCode just now. I know it's not much of an "answer" but it just worked for me.

Edit: this is still working as of July 2018 for folks. Edit: this is still working as of January 2019 xcode 9.4.1

Solution 2 - Ios

enter image description here

I was having difficulty with the SetOwnerAndGroup part of Archiving - I was getting /usr/sbin/chown failed, and it was getting 'operation not permitted' on each file it tried to 'chown'.

This was easily tested in the terminal - 'chown' doesn't work, but 'sudo chown' does. Since I had no need to be changing file permissions, the simplest solution was to not do the chown.

The screenshot above shows - I just blanked out Install Owner/Group, and that did it.

Solution 3 - Ios

When I got this error, rebooting my computer fixed it.

Solution 4 - Ios

I have tried all the other solutions but none of them worked for me. So I have run this on a terminal to change the owner to me on every file in my project:

sudo chown -R my_username:my_group ./my_project_folder

where "my_username" is you username, "my_group" is your group (this is usually staff) and "my_project_folder" your project's folder.

Solution 5 - Ios

None of the other solutions worked for me on Xcode 4.5. What I had to do was the following:

The fix is by removing the armv6 architecture from both your project and the CordovaLib project, clean both projects, and rebuild.

Source

Solution 6 - Ios

To it works in my environment I cleaned all information about permission, as +adalle said, complemented by Tom and Phil

I emptied the fields Install Group, Install Owner, Install Permission including the Cordova SubProject

Solution 7 - Ios

enter image description hereI had the same issue with Xcode . It started working after restarting Xcode. In the screenshot , Xcode ->build settings , installed group was empty after restarting Xcode .the group id it has showed as some number.

Solution 8 - Ios

Not sure if this is the same problem you are having, but this fixed it for me:

When I created my XCode project, my app name had a space in it, so trying to deploy my app always failed. I was able to fix this by using a Custom Archive Name.

In XCode 4...

  1. Edit the Deployment Scheme
  2. Click on the Archive tab
  3. Then specify an Archive Name that doesn't have spaces in it.

Specify a Custom Archive Name

Solution 9 - Ios

I tried all possible variants and they didn't help me. So I downloaded old XCode 4.4.1 and voila - application archived successfully :)

Solution 10 - Ios

  1. Select the target that's giving you the error
  2. Change Build Active Architecture Only from Yes to No

That worked for me.

Solution 11 - Ios

For me reboot my mac fixed it. OS High Sierra, xCode 9.2

Solution 12 - Ios

When this happens to me on Xcode 8, I do "Clean build folder" 2 times (the first time it throws an error, but the second time succeeds) and then archive again.

Note: The "Clean build folder" option is under "Product" Menu, hold the alt button and you will see the "Clean" option changing to "Clean build folder".

Solution 13 - Ios

  • Clean your project.
  • Clean your build Folder. (Product > ⌥ > Clean Build Folder)
  • Set the target device to Generic iOS Device .

enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJustinView Question on Stackoverflow
Solution 1 - IosDanView Answer on Stackoverflow
Solution 2 - IosadalleView Answer on Stackoverflow
Solution 3 - Iosdl.View Answer on Stackoverflow
Solution 4 - IosSpyros El.View Answer on Stackoverflow
Solution 5 - IosBashevisView Answer on Stackoverflow
Solution 6 - IosHelder RobaloView Answer on Stackoverflow
Solution 7 - IosKishorView Answer on Stackoverflow
Solution 8 - IosAndrewView Answer on Stackoverflow
Solution 9 - IosVladimir TkachenkoView Answer on Stackoverflow
Solution 10 - IosfunrollView Answer on Stackoverflow
Solution 11 - IosThafer ShahinView Answer on Stackoverflow
Solution 12 - IosquaracView Answer on Stackoverflow
Solution 13 - IosjohnnyView Answer on Stackoverflow