October 14th, 2015

The MoveSecurityAttributes policy affects only how Explorer recalculates ACLs when a file is moved; everybody else is on their own

A customer reported that even though they were deploying Move­Security­Attributes policy to all their machines, it wasn’t working everywhere. “It works fine with the GUI but does not work (i.e., has no effect) when using the Move command at the command prompt.”

That’s right.

The Move­Security­Attributes policy applies to Explorer’s file copy engine, the thing that kicks in when you call SHFile­Operation or use the IFile­Operation interface.

The command prompt doesn’t use either of those functions. It just calls the Move­File­Ex function directly. And that function doesn’t respect UI policy because it’s not a UI function.

The KB article does say this when it finishes talking about the default behavior and starts talking about the policy:

By default…

You can modify how Windows Explorer handles permissions when objects are copied or moved…

(Emphasis mine.)

The article points out that the technique applies only to Windows Explorer. Mind you, it’s not underlined or anything, so somebody in a hurry is like to miss out on that detail.

So here’s a blog entry to make it more clear.

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.