ftp://
reco711554 is the account (username) and also the root folder, within which i have folders: databases, logs and www.
The thing is REK2, i have a working script, but it wont upload cos it says i dont have folder permissions.
I use a script i found, perms.asp (below) which enables me to have write permissions, by letting me log in as i would do in an ftp connection, at this point the folder can be uploaded to, but never without this script.
All my scripts now work, i just dont want to have to enter the username and password, everytime i upload through my browser. The combination of a pure asp script i found a few days ago, and the perms.asp file let me do what i want, its just a bit messy
Thanx again for all your effort
Dave
perms.asp
------------------------------
<%
option explicit
'' on error resume next
dim url
url = Request.ServerVariables("SCRIPT_NAME"
dim logon
logon = Request.ServerVariables("LOGON_USER"
dim Folder
Folder = Request("Folder"
'' give us a 15-minute timeout, just in case we need it. The default is only like 90 seconds, and cacls can take a while...
Server.ScriptTimeOut = 900
if (logon = ""

then
if (Request("auth"

<> ""

then
Response.Status = "401 Authorization Required"
%>
<P>This script just sent a "401 Authorization Required" challenge. Your browser should have prompted you for a username and password, and then let you through.</P>
<P>If you did not see a challenge for username and password *, that means that this web site is not configured for user authentication.</P>
<P>Have the administrator (or you, if you can do it) visit the Internet Information Server MMC, select this web site, select "Properties", then "Directory Security", then "Anonymous Access and Authentication Control", and then to select one or more authentication packages, preferably "Basic". Basic authentication is the only one that will work if your have a non-IE browser.</P>
<P>* A proper challenge looks something like <A HREF="
<%
Response.End
else
Response.Write("<P>You are not currently logged in to this web page with an NT account.</P>"
end if
else
Response.Write("<P>You are logged in as '" & logon & "'.</P>"
end if
%>
<P>[ <A HREF="<% = url %>">Refresh</A> ]</P>
<% if (logon = ""

then %>
<P><B>Step 1: </B><A HREF="<% = url %>?auth=1">Test Authentication</A></P>
<% elseif (Folder = ""

then %>
<%
dim ScriptPath
ScriptPath = Server.MapPath(url)
'' remove everything after the final "\"
dim X
X = instrrev(ScriptPath, "\"
Folder = Mid(ScriptPath, 1, X - 1)
%>
<FORM METHOD=get ACTION="<% = url %>">
<TABLE BORDER=1>
<TR>
<TD ALIGN=right VALIGN=top>Script name:</TD>
<TD><% = url %></TD>
</TR><TR>
<TD ALIGN=right VALIGN=top>Script path:</TD>
<TD><% = ScriptPath %></TD>
</TR><TR>
<TD ALIGN=right VALIGN=top>Folder:</TD>
<TD><% = Folder %></TD>
</TR><TR>
<TD ALIGN=right VALIGN=top>Current Permissions:</TD>
<TD><PRE><% = Run("cacls """ & Folder & """ /C"

%></PRE></TD>
</TR><TR>
<TD><BR></TD>
<TD><INPUT TYPE=submit VALUE="Make Writable"></TD>
</TR>
</TABLE>
<INPUT TYPE=hidden NAME="Folder" VALUE="<% = Folder %>">
</FORM>
<%
else
%><P>Attempting to make the folder "<% = Folder %>" writable...</P><%
dim command
command = "cacls """ & Folder & """ /E /G Everyone:C /C /T"
%>
<P>Executing command:</P>
<BLOCKQUOTE>
<PRE><FONT COLOR=#ff0000><% = Server.HTMLEncode(command) %></FONT></PRE>
</BLOCKQUOTE>
<P>Command response:</P>
<BLOCKQUOTE>
<PRE><FONT COLOR=#ff0000><% = Server.HTMLEncode(Run(command)) %></FONT></PRE>
</BLOCKQUOTE>
<TABLE BORDER=1>
<TR>
<TD ALIGN=right VALIGN=top>Folder:</TD>
<TD><% = Folder %></TD>
</TR><TR>
<TD ALIGN=right VALIGN=top>Current Permissions:</TD>
<TD><PRE><% = Run("cacls """ & Folder & """ /C"

%></PRE></TD>
</TR>
</TABLE>
<%
end if
'' Executes the command given, and returns stdout and stderr as string:
function Run (command)
dim oShell, oFileSystem, strTempFile, strCommand
set oFileSystem = CreateObject("Scripting.FileSystemObject"

if (Err.Number) then
Run = "Error creating object Scripting.FileSystemObject - " & Err.Number & " - " & Err.Description
exit function
end if
strTempFile = oFileSystem.GetSpecialFolder(2) & "\" & oFileSystem.GetTempName()
set oShell = CreateObject("WScript.Shell"

if (Err.Number) then
Run = "Error creating object WScript.Shell - " & Err.Number & " - " & Err.Description
exit function
end if
strCommand = "CMD /C """ & command & " 1> " & strTempFile & " 2>&1"""
call oShell.Run(strCommand, 1, true)
if (oFileSystem.FileExists(strTempFile)) then
dim oFile
set oFile = oFileSystem.GetFile(strTempFile)
if (oFile.Size) then
dim oText
set oText = oFileSystem.OpenTextFile(strTempFile, 1, false)
Run = oText.ReadAll
oText.Close
set oText = nothing
else
Run = "Failed to redirect command output."
end if
set oFile = nothing
else
Run = "Failed to redirect command output."
end if
set oFileSystem = nothing
set oShell = nothing
end function
%>
<P><HR SIZE=1></P>
<P>This is an ASP page, written in vbscript, that will attempt to set NTFS directory permissions on the folder that this script is in. The permissions will extend to all subfolders and files.</P>
<P>The folder will be made world-writable by granting the "Everyone" group the "Change" permission. ACLs on files and folders are edited, not overwritten.</P>
<P><B>Dependencies</B></P>
<UL>
<LI> Windows NT or 2000 operating system running on server
<LI> Microsoft IIS web server software (current server software is <% = Request.ServerVariables("SERVER_SOFTWARE"

%>)
<LI> IIS configured to allow User Authentication
<LI> NTFS file system
<LI> WScript.Shell and Script.FileSystemObject COM objects, which are installed by default on Windows with the Windows Scripting Host
<LI> the cacls program, provided with Windows NT/2000 by default
</UL>
<P><HR SIZE=1></P>
<P><B>Instructions for Use</B></P>
<OL>
<LI> Place this ASP file into a folder whose permissions you want to set
<LI> Request this file using a web browser
</OL>
<P>Copyright © 2000, <A HREF="
Milosevic</A>, All Rights Reserved</P>
<P><HR SIZE=1></P>