NTFS perms + inheritance + xcacls


I’m trying to apply NTFS permissions (using xcacls.vbs), but I’m running into difficulties with inheritance.  Basically I have 2 departments, dept1 and dept2.  The permissions/rules that I want are as follows:

1) Dept1 & dept2 can list folder contents for both departments.
2) Dept1 can move files from dept2 into their folder.

The folder structures look like:



The xcacls.vbs commands I’m using are:

xcacls.vbs .\ /o builtin\administrators /g builtin\administrators:f;f /g domain\dept1:1;1 /g domain\dept2:1;1 /t /s /f

xcacls.vbs .\dept1\ /g domain\dept1:rw;rw /t /s /f /e

xcacls.vbs .\dept2\ /g domain\dept1:r;r /g domain\dept2:rw;rw /t /s /f /e

This all works fine, until a user from dept1 moves files from dept2 into .\dept1\  The dept2 files now in .\dept1\ still have the permissions from .\dept2\ which means that dept1 cannot write to them, and dept2 can read from them.  Is it possible to configure the permissions in such a way that when a file is moved from .\dept2\ into .\dept1\ that file inherits the permissions of the parent directory (i.e. .\dept1\)

(The above scenario doesn't happen if the files in question are copied, but thats poor usage of disk space)

Any help is appreciated,
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sorry, that's just not possible, at least not if the file is *moved*. If a file is moved (on the same volume), NTFS permissions are retained. The only workaround is to copy the file to the target location, then delete the original.

Inherited Permissions Are Not Automatically Updated When You Move Folders

How Permissions Are Handled When You Copy and Move Files and Folders

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
OS Security

From novice to tech pro — start learning today.