windows 7 - Files copied to shared folder do not inherit permissions

06
2014-04
  • aland

    I have a shared directory with the Guest account having Read & execute, Read, List contents permissions. I can access files over the network (e.g. on my tablet or laptop) without issue. However, my downloads go into a temp directory and when completed are moved to my shared directory. The files are then visible over the network but cannot be accessed (read) until I manually add the Guest user permissions on the file or re-apply the permissions on the top level.

    If I understand - Why are file permissions retained when moving files within the same volume? - the issue must be that my temp directory is applying permissions to the files, and these permissions are being copied to the shared directory rather than inheriting.

    How can I remove all special permissions from the temp directory, or otherwise - how can I force files copied into a shared directory to inherit the permissions?

    E:\>icacls _temp
      _temp BUILTIN\Administrators:(I)(F)
      BUILTIN\Administrators:(I)(OI)(CI)(IO)(F)
      NT AUTHORITY\SYSTEM:(I)(F)
      NT AUTHORITY\SYSTEM:(I)(OI)(CI)(IO)(F)
      NT AUTHORITY\Authenticated Users:(I)(M)
      NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(IO)(M)
      BUILTIN\Users:(I)(RX)
      BUILTIN\Users:(I)(OI)(CI)(IO)(GR,GE)
    
  • Answers
  • surfasb

    You could just apply Guest permissions to the Temp folder.

  • Sundi

    First, are you using the built-in Guest account? This account should not be used for security reasons and you can create a new user specifically for the shared folder(s), while also giving this user very limited rights. Create a group for that user and provide that group access to both folders- also remove this user from the Users group if it's supposed to be very limited.


  • Related Question

    windows 7 - How to get full permissions on non-install NTFS drive?
  • Michael Borgwardt

    After building a new computer, I'd like to copy the contents of my old Windows XP box's harddrive to have access to any important data on it that I might not be thinking of right now.

    But when I connect the old harddrive to the new Windows 7 box, the NTFS access permissions prevent me from copying its contents. I tried giving ownership and full permissions to my new user account and have this inherited for everything, but that fails with a "permission denied" error. I can take ownership of individual files and directories and assign permissions, but having them inherited does not work, so it's been a painfully slow, repetitive task to even extract a handful of important files.

    Isn't there any way to get access to the entire drive at once, given that I have administrator rights on this box? Read-only would be sufficient.


  • Related Answers
  • mihi

    Use subinacl from Microsoft TechNet to recursively take ownership if the GUI cannot recursively take ownership for you. (run it in an elevated command prompt).

    When you are the owner, just recursively give yourself full control.

    You can also use subinacl to substitute your old user SIDs by the new ones in your reinstalled system. Then you won't have full control, but the same control as before.

  • Hello71

    Fastest way, IMHO, is just to boot up from a *nix live CD that supports NTFS (or just install it), then copy from there. IIRC, most NTFS implementations ignore permissions, simply because they're different from the way *nix permissions are assigned.

  • nitind

    The built-in command, icacls, can also be used.

    http://technet.microsoft.com/en-us/library/cc753525(v=ws.10).aspx