Q&A: Can I reset Windows ACLs for a folder?

Question

Can I reset Windows ACLs for a folder?

Answer

This is easiest achieved by copying the entire directory without copying the extended attributes which store the Windows ACLs.
You will need enough free space to duplicate the data, though.
Type in as root:

mv SRC_FOLDER SRC_FOLDER.bak
mkdir SRC_FOLDER
chmod SRC_FOLDER --reference=SRC_FOLDER.bak 
chown SRC_FOLDER --reference=SRC_FOLDER.bak 
tar -cvf - -C SRC_FOLDER.bak . | tar -C SRC_FOLDER -xpf -

After this procedure no files or directories do have any ACLs because the tar command does not copy them.

See Also

Mastodon