Saturday 4 August 2018

command line - takeown /R not applying to hidden files


I'm running a batch command to take ownership of a set of user folders and I'm finding that the ownership is not being pushed down to hidden files, such as ~normal.dot I'm using the following command: takeown /R /A /D Y /F D:\folderpath\username I don't see errors in the output, but when I try to robocopy that directory, I get access denied on such files. I find that I have to manually go to file properties > Security > Advanced > Edit (server 2008) > Replace all existing inheritable permissions on all descendants with inhabitable permissions from this object. Is there a way to make sure that I can move the folder after I've taken ownership of it?



Answer



Sounds like you took ownership with Takeown, but didn't give yourself read/write permissions (which is why you had to edit them via the GUI afterwards).


To do that from the command line you'd use icacls after using takeown.


Something to the effect of icacls /grant :F /t.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...