I have a batch file that copies folder from a temp directory to a public internet directory. The problem is, once the file is copied, the IUSR account doesn't have read privileges to the file and I get a 500 error. I can manually set permissions after upload, but is there an automatic way to do this for any file that gets added to the folder?

link|improve this question

56% accept rate
feedback

2 Answers

Microsoft has a paper called How permissions are handled when you copy and move files and folders that you should find interesting.

An easy answer is to use xcopy.exe, instead of copy. Using (at least) the following command line option, the file ACL's will remain intact:

xcopy.exe source destination /O
link|improve this answer
feedback

Got it solved. I added IUSR permissions to the windows/temp directory and it is inheriting the right permissions now.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.