IanR 0 Posted January 20, 2005 Just wondered if anyone has suggestions for ways of setting the permissions when creating a folder on an NTFS volume from within a script? (To complicate matters slightly this would also have to work across a network as a non-Admin user.) If it says "Made in China" then it just might be made by slave labour... Share this post Link to post Share on other sites
sugi 0 Posted January 20, 2005 It doesn't matter if you're admin or not to set permissions. If you have the permission to change the permissions you can do it. If you don't have permission you cannot do it even as an admin. The admin only has a way to reset these permissions. Also you don't have to care if it's local or remote. Only point when you're working remote: The share and directory permissions must grant you the permission to change them.Your best bet is to use cacls.exe or xcacls.exe as command line tools provided by Microsoft (AFAIR cacls ships with NT4+) after creating the directory. Share this post Link to post Share on other sites
IanR 0 Posted January 20, 2005 Your best bet is to use cacls.exe <{POST_SNAPBACK}>I was thinking along those lines, reason I asked was mainly in case I'd overlooked a way of implementing it without resorting-to a command-prompt. (although that would be OK in fact as it only has to be done once per run, to one folder, so it would have negligible performance-impact.) Other option might be a DLL-call, I guess. Have to check Technet to see what the call is, and if it's feasible. If it says "Made in China" then it just might be made by slave labour... Share this post Link to post Share on other sites