[python-win32] Directory permissions

d.w. harks dave at psys.org
Mon Jan 26 17:27:16 EST 2004


With carefully-arranged electrons, michael montagne wrote:
> I'm using this code to make directories at login(fso is 
> fso=win32com.client.Dispatch('Scripting.FileSystemObject') :
> 
> #home directory
> sDir="\\\\wmserver1\\Home\\" + sUser
> #check that directory exists
> if not fso.FolderExists(sDir):
> 	fso.CreateFolder(sDir)
> Trouble is, the permissions are wide open to the world.  I need to give 
> the administrator and the user full control but no other access to 
> anyone.  Even if I could run a script after the fact and correct all the 
> permissions that would be ok.
> 
> -mjm

Check the archives; there was some code posted to this list a while ago
which manipulates Windows ACLs.

You can do it either with the ADSI security DLL interface, or directly via
the win32 api.

dave

-- 
David W. Harks <dave at psys.org>  http://dwblog.psys.org



More information about the Python-win32 mailing list