change permission using .bat file in window server 2008 r2

change permission using .bat file in window server 2008 r2

I'm doing the permissions in Windows Server 2008 R2. I'm learning to use a batch file to do this quickly, but it's not doing the right thing that I want. This is the code of the simple .bat file

icacls D:\Test2 /grant p5:(wa)

This is the display:

http://i1090.photobucket.com/albums/i374/huydo155/i1_zps9f29cef5.png

User p5 has no permissions except "special permissions", and in the advanced menu, it displays:

http://i1090.photobucket.com/albums/i374/huydo155/i2_zps63f8167b.png

It's the right permission that I want, and I'm trying permissions like

icacls D:\Test2 /grant p5:(d,m)

It's just displayed like in picture 1.

My Question: i want when i set, permission gonna is "this folder, subfolders and files" and the permission outsite (like in pic 1) must be set. how i can do it?

答案1

Your question is a little hard to understand, but in the first case, you are granting user "p5" JUST the ability to write attributes. In the second case, you are granting rights JUST to delete or modify. In neither case are you granting read and/or file-scan rights, which would seem very odd to me. So you see the "special permissions".

I am not sure exactly what you want to get, but you should be giving read, file-scan, and then the "write"-related rights if you want the user to be able to delete files or change their attributes.

相关内容