0

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?

Thanks!

2 Answers2

3

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.

Examples:

  • 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)
ThatGraemeGuy
  • 15,788
0

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.

Igal Serban
  • 1,595