Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to share and give full access to folder and inner folder in Server 2008

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 /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.

like image 480
user370267 Avatar asked May 04 '11 14:05

user370267


1 Answers

This worked for me:

  1. Enable guest account:

    net user guest /active:yes

  2. Share the folder:

    net share cshare=c:\shared /GRANT:Everyone,FULL

  3. 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

like image 143
Alex Okrushko Avatar answered Oct 18 '22 10:10

Alex Okrushko