Remove 'Everyone' Access from D:\
Keywords: Remove Everyone access
Question:
I seem to be having problems getting the following code to work on Win2K SP2 Server.rslt=wntAccessDel("", "D:\", "Everyone", 300, 160) message ("!",rslt)I'm logged in as an admin, using WB2002B, and the 3/8/02 version of wwwnt34i.dll.I add access for the local admin group and "authenticated users" before removing access for everyone. It's part of a security script to make out web boxes more secure so our management has that happy safe feeling...
It does add the additional permissions nicely. I just can't make "Everyone" go away on the root.
If DirExist("d:\") Then wntAccessAdd( "", "d:\", "Authenticated Users", 300, "Dir:ReadExecute|Dir:List", 160) wntAccessAdd ( "", "d:\", "Administrators", 300, "Dir:Full", 160) rslt=wntAccessDel("", "D:\", "Everyone", 300, 160) message ("!", rslt) EndIfAnswer:
Are there any other permissions applied to the root folder of the D: drive besides the default ones for "Everyone"?The reason that I ask is that if there are no other permissions explicitly assigned to another group/user for the root folder of a volume then by default Win2K assumes that "Everyone" gets "Full Control".
First try using wntAccessAdd() to grant "Full Control" to some group like "Administrators" and then try the wntAccessDel() to remove rights for "Everyone" from the root folder.
Article ID: W15198