1 2 3 Previous Next 30 Replies Latest reply: Jul 27, 2012 9:38 AM by Linc Davis
Scotttt Level 1 Level 1 (0 points)

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

  • 1. Re: Unable to delete files - permission access denied
    Linc Davis Level 10 Level 10 (117,920 points)

    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.

  • 2. Re: Unable to delete files - permission access denied
    Scotttt Level 1 Level 1 (0 points)

    As requested, here is the result:

    Last login: Wed Jul 25 21:52:58 on ttys000

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

    ls: illegal option -- /

    usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]

    scotts-mac-pro:~ scottxxxx$

  • 3. Re: Unable to delete files - permission access denied
    Linc Davis Level 10 Level 10 (117,920 points)

    You didn't press the space bar. Please try again.

  • 4. Re: Unable to delete files - permission access denied
    Scotttt Level 1 Level 1 (0 points)

    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$

  • 5. Re: Unable to delete files - permission access denied
    Linc Davis Level 10 Level 10 (117,920 points)

    Is there any particular reason why you put ACL's on those files, or why the ACL's shouldn't be removed?

  • 6. Re: Unable to delete files - permission access denied
    Scotttt Level 1 Level 1 (0 points)

    Thanks Linc...

    I did not specifically assign any access control list parameters to those folders/files.  To be hosest, I do not know how to do that.  Perhaps this occurred by accident?  Could you please advise me as to how to remove the parameters so that the folder can be trashed?  Thanks for your advice.   Scott

  • 7. Re: Unable to delete files - permission access denied
    Linc Davis Level 10 Level 10 (117,920 points)

    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.

  • 8. Re: Unable to delete files - permission access denied
    Scotttt Level 1 Level 1 (0 points)

    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.

  • 9. Re: Unable to delete files - permission access denied
    Linc Davis Level 10 Level 10 (117,920 points)

    You have yet one more complication: some of your files are locked.

     

    Enter the following command in the same way as above:

     

    sudo chflags -R nouchg,nouappnd !$

  • 10. Re: Unable to delete files - permission access denied
    Scotttt Level 1 Level 1 (0 points)

    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?

  • 11. Re: Unable to delete files - permission access denied
    Linc Davis Level 10 Level 10 (117,920 points)

    Yes.

  • 12. Re: Unable to delete files - permission access denied
    Linc Davis Level 10 Level 10 (117,920 points)

    I just noticed that I haven't yet advised you to back up all data. I'm assuming you've already done that, but if you haven't, you should do it first, before you do anything else. That applies whether you take my other suggestions or not.

  • 13. Re: Unable to delete files - permission access denied
    Scotttt Level 1 Level 1 (0 points)

    Yes, I have a Time Machine backup of that drive.  Af far as preserving the data, will this process affect only the one offending folder, all folders on the data drive or other drives as well?  In other words, could this process affect other drives unrelated to this problem?  Thanks again for all your help.

  • 14. Re: Unable to delete files - permission access denied
    Linc Davis Level 10 Level 10 (117,920 points)

    It will affect only that folder and its contents.

1 2 3 Previous Next