Delete directory with custom access?

How do I delete an empty directory with "Custom Access"? I get permission denied although I have read/write permission.

MacBook Pro 13″, macOS 10.13

Posted on May 29, 2023 7:00 AM

Reply
Question marked as Top-ranking reply

Posted on May 29, 2023 10:18 AM

Custom Access implies there is an Access Control List (ACL) attached. An ACL can override the POSIX permissions.

For most ACLs, you can override with admin authentication. Is your user admin capable? If so, and you don't get the authentication dialog, then there is some non-standard ACL attached.


Open Terminal, copy/paste this in, leave a space, then drag the directory into the Terminal window. Hit return.

ls -led 


You should see at least two output lines. The second through end should start with a digit and : (e.g., 0:).

One common ACE is "group:everyone deny delete"

That will prevent deleting the directory, but you should be able to override it with authentication.

2 replies
Question marked as Top-ranking reply

May 29, 2023 10:18 AM in response to Farse

Custom Access implies there is an Access Control List (ACL) attached. An ACL can override the POSIX permissions.

For most ACLs, you can override with admin authentication. Is your user admin capable? If so, and you don't get the authentication dialog, then there is some non-standard ACL attached.


Open Terminal, copy/paste this in, leave a space, then drag the directory into the Terminal window. Hit return.

ls -led 


You should see at least two output lines. The second through end should start with a digit and : (e.g., 0:).

One common ACE is "group:everyone deny delete"

That will prevent deleting the directory, but you should be able to override it with authentication.

May 29, 2023 1:44 PM in response to Barney-15E

Thank you for your prompt response. I had tried sudo rmdir with authentication without success. I subsequently changed the location of the empty directory and tried again successfully. I have no way to explain this; perhaps I was doing something wrong the first time.


I will save your response for use in case this happens again.

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.

Delete directory with custom access?

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