Groups | Blog | Home
all groups > iis ftp > february 2006 >

iis ftp : Script to "check" read/write checkbox


Mark B
2/13/2006 1:01:29 PM
In the Properties for an FTP site on the "home directory" tab. There are
checkboxes for Read/Write/LogVisits. In IIS 5.0 when you used mkftpsite.vbs,
those checkboxes would default to be checked and the logged in user could
read/write provided they were logged in as could read/write to the directory.

In IIS6.0 (iisftp.vbs) when you create a new site (no user isolation), the
site created does not have those checkboxes checked and there doesn't seem to
be an option to check them. When a user logs in they get access denied if
they try to write. If I manually check those boxes it works as in IIS 5.0.

Is there any way using a script to get those checked? I looked at the
properties script (adsutil.vbs) and it doesn't give the option there either,
Mark B
2/13/2006 3:13:57 PM
Solved using adsutil.vbs:

It turns out there is a property for FTP read/write access that adsutil.vbs
can write. The AccessRead/AccessWrite properties are not shown with
"adsutil.vbs ENUM_ALL" if the site was created with iisftp.vbs. (They are if
the site was created through the GUI - which is how I stumbled across it).

The following will set the write access for the site:
Grokon
2/14/2006 5:05:26 PM
Hello Mark B,
What about scripting it for Virtual Directory?
As i'm working a batch file that create user, directory(set acl) and virtual
directory. But, the only issue that i still get is that i have to use the GUI
to check "write". I'd like to change it trough command line.

Thanks


[quoted text, click to view]
Grokon
2/15/2006 6:03:17 PM
Thanks,
i already found it yesterday, but forgot to write it back here for others
users getting same probleme.
Thank you anyway

Grokon

[quoted text, click to view]
Chris Crowe [ IIS MVP 1997 -> 2006 ]
2/16/2006 12:00:00 AM
You should be able to specify the path to the virtual directory as below.

cscript adsutil.vbs SET MSFTPSVC/1/root/[VIRTUAL DIRECTORY]/AccessWrite
"true"

note: Change the 1 for the actual FTP Instance ID

Chris


--


Cheers

Chris Crowe [IIS MVP 1997 -> 2006]
http://blog.crowe.co.nz
------------------------------------------------

[quoted text, click to view]

AddThis Social Bookmark Button