戰地連結︰ Home My Flickr NBA.com About

2009年5月29日星期五

Moved files cannot inherit destination folder's permission, but copied files can.

Overview

When I want to share a file with others in the same network, I move the file to my shared folder. However, sometimes I receive complains from my colleagues saying that they don't have permission to read the shared files.

At the end, I found that a copied file can inherit the permission of the destination folder, but a moved file cannot. I think that it is because the copy action create a new file while the move action (within same volume) only change the hosting folder of the original file.

With some googling, I found that this behaviors is documented by Microsoft. The article also provide a way to change this behavior by modifying registry.

Reference

How permissions are handled when you copy and move files and folders

Step

Let moved files inherit destination folder's permission like copied files

  1. Run "regedit" (Fire up Registry Editor)
  2. Go to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer"
  3. Add a "DWORD" value with name "MoveSecurityAttributes" and Value "0"

沒有留言: