Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Unable to delete files - permission access denied

Greetings,


I am trying to delete files & folders from a second internal hard drive used for data only, but I am unable to complete the task as first I have to enter my password, then I get the error message 'The operation can't be completed because you don't have permission to access some of the items.'


Getting Info for that drive and folders indicates that I have Read & Write permissions. I even re-applied the permissions using the drop down gear. I have restarted the workstation as well. No luck.


I ran the disc utility application to Verify Disc, which returned a message the the disc was good. Verify or Repair Disc Permissions were greyed out, which I believe they are supposed to be.


Any thoughts will be appreciated. Thanks, Scott

Posted on Jul 25, 2012 6:35 PM

Reply
32 replies

Mar 23, 2017 10:45 PM in response to Scotttt

Hi there,

Try this it worked for me. Go to the folder info. (cmd + i) , unlock the "sharing and permissions" section at lower end, under "names" select your name and re-select 'read and right' option (even if it is already selected). Below that click on drop down settings gear and select "apply to enclosed items", lock the preferences and then try to delete the folder. if still it isn't working then go inside the folder and see if the icons showing "lock sign" on them. if yes then you have to unlock them manually from their "info". try to manually change permissions to items inside folder (if you have less items in there). then try to delete those items first one by one and when the folder gets empty then you can delete the folder too.

Jul 25, 2012 8:44 PM in response to Scotttt

Launch the Terminal application in any of the following ways:


Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)


In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.


Open LaunchPad. Click Utilities, then Terminal in the page that opens.


Drag or copy — do not type — the following line into the Terminal window, then press the space bar:


ls -Odel


Drag the icon of the folder containing the files you want to delete from the Finder into the Terminal window, then press return.


Post any lines of output that appear below what you entered — the text, please, not a screenshot.


Your user name may appear in the output. Anonymize it if you wish.

Jul 26, 2012 6:28 AM in response to Scotttt

Thank you, here is the requested result (the prior post was in error):


Last login: Wed Jul 25 21:53:29 on ttys000

scotts-mac-pro:~ scottxxxx$ ls -Odel /Volumes/Data\ HD\ 2/Z\ Photos\ Copied\ From\ XP-G

drwxrwxrwx@ 5 buldog1 staff - 170 Jul 25 18:19 /Volumes/Data HD 2/Z Photos Copied From XP-G

0: group:admin allow list,search,readattr,readextattr,readsecurity

1: user:scottbulmer allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextat tr,writeextattr,readsecurity

scotts-mac-pro:~ scottxxxx$

Jul 26, 2012 8:57 AM in response to Scotttt

Enter the following command in the Terminal window in the same way as before, then press return:


chmod -R -N !$


The command may take a noticeable amount of time to run. When a new line ending in a dollar sign ($) appears below what you entered, it’s done. You may see a few error messages about an “invalid argument” while the command is running. You can ignore those. If you get an error message with the words “Permission denied,” enter this:


sudo !!


You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up.

Jul 26, 2012 9:14 AM in response to Linc Davis

Linc, I just need to be clear on this before proceeding with the sudo !! command in Terminal.


After running chmod -R -N !$, in approximately one second approximately two hundred files are listed with the following as a typical example:

chmod: Failed to clear ACL on file Tepper Stable 1.psd: Operation not permitted.


Then pasting in your recommended sudo !! command I get the following message:

scotts-mac-pro:~ scottxxxx$ sudo !!

sudo chmod -R -N /Volumes/Data\ HD\ 2/Z\ Photos\ Copied\ From\ XP-G


WARNING: Improper use of the sudo command could lead to data loss

or the deletion of important system files. Please double-check your

typing when using sudo. Type "man sudo" for more information.


To proceed, enter your password, or type Ctrl-C to abort.

Password:


In your opinion is it safe to proceed? Have I execuited the commands correctly? Thanks again for your help.

Jul 26, 2012 11:34 AM in response to Linc Davis

After entering sudo chflags -R nouchg,nouappnd !$, here is the result (for one example file):


chmod: Failed to clear ACL on file Thumbs.db: Operation not permitted

scotts-mac-pro:~ scottxxxx$ sudo chflags -R nouchg,nouappnd !$

sudo chflags -R nouchg,nouappnd /Volumes/Data\ HD\ 2/Z\ Photos\ Copied\ From\ XP-G



WARNING: Improper use of the sudo command could lead to data loss

or the deletion of important system files. Please double-check your

typing when using sudo. Type "man sudo" for more information.



To proceed, enter your password, or type Ctrl-C to abort.



Password


Should I proceed based on the above warning?

Unable to delete files - permission access denied

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