How can I alter the permission of a file without using Get Info?

There is a file that I can't delete. When I try to delete the file, there is an error message that says "The operation can't be completed because you don't have permission to access some of the items."


When I look at "Get Info", the "Sharing & Permissions:" says "You can only read" but in the table, it states that I have privilege to "Read & Write". I can't click the lock to change this.


Is there any other way to alter the permission of a file without using "Get Info"?


MacBook Pro 13", macOS 10.13

Posted on Dec 5, 2019 7:22 PM

Reply
Question marked as Top-ranking reply

Posted on Dec 18, 2019 9:16 AM

Use the following to unset that user immutable flag uchg:


cd ~/Desktop
chflags -vv nouchg ./DSC_6350.JPG
rm -f ./DSC_6350.JPG


No sudo is required to unset uchg.

9 replies

Dec 5, 2019 7:46 PM in response to chocofudgecake

Check the protections on the directory that this file is stored in. Make sure you can write that, too.

If this is an SD card, check the write-lock.


Failing that, launch Terminal.app and enter:

ls -ale@

with a trailing space on that string. Then drag the DSC_6530.JPG file from Finder and the GUI and into the terminal session, and you’ll get the path added to the end of the command. The dile itself won’t move, a d won’t be changed. Then press return to execute the command. Post the output from that ls command.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I alter the permission of a file without using Get Info?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.