Welcome to WebmasterWorld Guest from 54.144.79.200

Forum Moderators: ocean10000

Message Too Old, No Replies

Webserver - Quotas

ASP Script to change file ownership for the quotas

     

chris_f

7:52 am on Sep 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi All,

I am running a Win2003 web server. I have enforced quotas for all my clients, however, not all clients ftp to our server under necessary username for the quota.

I am looking to create a script that goes through our users folders (daily) and makes sure all the files have the correct owner and, if not, changes the owner.

I can create the script but don't know how to get or change the file owner. Does anyone know a way of doing this?

Thanks,
Chris.

aspdaddy

10:59 am on Sep 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Maybe you can use the LDAP/ADSI Componet or IADSecurityUtility to get into Active Directory?

I'v not tried this but it might get you started dow the right track.

Set objFile = CreateObject("SecurityDescript­or")
objFile.GetSecurityDescri­ptor("c:\myFile.doc")
objFile.Owner = "whatever"

chris_f

12:16 pm on Sep 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



thanks aspdaddy. looking into it now.