Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I have an application that I'd like to change the icon for. If I drag and drop the new icon into the app's Contents/Resources/ via the GUI, the app updates ok.

However, if I cp the icon in the terminal the icon doesn't update, and the original icon is still displayed or a slightly broken version of the original is shown.

What else do I need to do to allow the .icns to be updated via the terminal (I need to be able to script this for a project.)

Many thanks.

share|improve this question

I'd check two things:

  1. Make sure that filename.icns is the exact filename referenced in Contents/_CodeSignature/CodeResources and Contents/PkgInfo

  2. Make sure that the permissions for filename.icns are correct. If you run ls -l from within Contents/Resources/, you should see that filename.icns has the owner root and the group wheel, with permissions listed as -rw-r--r--. If you do not see that, the commands you'll need to run to fix this are:

    sudo chown root:wheel filename.icns

    sudo chmod 644 filename.icns

If you'd like a little more info on permissions check out the following links: (helpful guide on permissions and ownership) (chown manual) (chmod manual)

share|improve this answer
Unfortunately that's already the case with the permissions / access modes correct, when the file is copied via the shell. BTW, user ownership permissions don't come into play with the drag-drop method. The owner was listed as username:admin – Slomojo Jul 12 '13 at 0:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.