I have Windows Server 2008. I want to create a folder and share it in network with full access (read and write) to all, whoever access this folder and inner folders too via network from any operating system PC (Win 7 and Win XP).
I want to build up a single setup that can work on Win XP, Vista, Win 7(32 & 64), Server 2003 and Server 2008.
I have downloaded subinacl
and run the following batch file
net share %1=%2 /UNLIMITED
subinacl /share %1 开发者_如何学Go/grant="S-1-1-0"=F
subinacl /file %2 /grant="S-1-1-0"=F
Where %1
and %2
are the share name and the path of the folder respectively.
I think this command does not give everyone right to the inner folder. I want to give full share and full access to everyone for all folder and files inside the %2
folder.
This worked for me:
Enable guest account:
net user guest /active:yes
Share the folder:
net share cshare=c:\shared /GRANT:Everyone,FULL
Sometimes sharing the folder doesn't give the Everyone FULL permissions, so run the Icacls command as well:
Icacls C:\shared /grant Everyone:F /inheritance:e /T
The xcacls.vbs script can handle the NTFS permissions, you can download it here http://support.microsoft.com/kb/825751 - you'll need to modify it slightly to get it to work on Windows 7 \ Server 2008, but if you run cscript.exe xcacls.vbs /? on a Windows 7 or Server 2008 machine it will tell you how to modify it.
Example:
grant everyone full control to C:\shared and all subfolders:
cscript.exe xcacls.vbs c:\shared /G:Everyone:F /SPEC B
You should be able to use NET SHARE to create the share as well, but it sounds like you've already got that covered:
net share cshare=c:\shared /GRANT:Everyone,FULL
精彩评论