27
7
I'm trying to find the terminal command on a Mac to remove ACL to fix user permissions on a folder that gives an error code when I try to copy it (error code -41).
27
7
I'm trying to find the terminal command on a Mac to remove ACL to fix user permissions on a folder that gives an error code when I try to copy it (error code -41).
45
Using chmod -a
allows one to remove access control entries individually (as @geekosaur suggested).
But if you are looking to remove all ACLs from a file or folder, the solution is to use the brute-force option: chmod -N
which removes all access control entries for a file or folder.
chmod -RN
will do the same recursively for a folder and its entire contents.
4
It's all bundled into the chmod
command; take a look at the -a
/+a
/=a
options in the manpage.
You know, the funny thing here is that in the man page indicates
chmod -a# 1 file1
to remove attributes based on their numeric assignment as shown vials -le
-- this doesn't seem to work. Anyone have some specific examples of this working? – ylluminate – 2018-08-12T19:24:10.373@ylluminate I've used it that way. Are you quoting/escaping the
#
character (to keep it from being treated as a comment delimiter), as inchmod -a\# 1 filename
orchmod '-a#
1 filename`? – Gordon Davisson – 2018-08-12T23:56:20.753Good call @gordon-davisson, this particular workstation of ZSH was supposed to not require escaping of
#
on this particular workstation, but it did and that solved it. – ylluminate – 2018-08-13T01:34:37.363