Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Today I did a web site update and got this strange behavior I never experienced before. I always copy files from a build folder to the prod folder. After I copied the file, I started getting a permission denied error in the web site, so I went to the file's property and noticed that it didn't has any of the corresponding permissions. My thought is that when copied the file, it didn't get the permissions inherited. Do you think this is something possible, and if so, what did I do wrong that caused that behavior?


share|improve this question
Did you do a copy or move? Was it from a folder on the same volume or a different volume? What FS is used on the source volume? – Daniel Lucas Sep 1 '09 at 20:34
I think did a move, was the same volume and the FS is NTFS – user19085 Sep 1 '09 at 20:42
A move preservers the permissions of the file (its the "same" file). – Igal Serban Sep 1 '09 at 20:46
@Igal: so you say a move could cause this behavior because if the file had different permissions on the source machine and then copied to the prod server, and then moved to the prod folder, could never get its permissions inherited, but if I did a copy it should have those assigned? – user19085 Sep 1 '09 at 20:49
Can't tell you how many freaking times this has bitten me... – squillman Sep 1 '09 at 21:10
up vote 3 down vote accepted

Moving files or folders within an NTFS volume will not cause the moved files/folders to inherit permissions from the destination folder.

If you copy files/folders within a volume OR if you move files/folders to a different volume, the copied items inherit the permissions of the destination folder.


  • Move C:\MyFolder to C:\SubFolder: MyFolder retains its own permissions (moving within the same volume)
  • Copy C:\MyFolder to C:\SubFolder: MyFolder inherits the permissions defined on SubFolder (copying within the same volume)
  • Move C:\MyFolder to D:\DubFolder: MyFolder inherits the permissions defined on SubFolder (moving between different volumes)
share|improve this answer
This is exactly what I was looking for, thank you very much! +1 btw – user19085 Sep 1 '09 at 21:00

The lesson to learn from that is that deployment should be done with scripts. And never by hand. This way errors are reproducible and can be investigated. And this is the way to improve.

share|improve this answer
Couldn't agree more Igal! We humans tend to do such things! I'll be working on that. Thanks! – user19085 Sep 3 '09 at 14:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.