Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permission denied 1

Status
Not open for further replies.

SmokeyJoe

Programmer
Nov 13, 2000
80
US
Using Win 2000, MySQL 4.015

I am trying a small function someone else wrote with the following code.
I get the error "permission Denied" when it tries to process the following command.

set filObject=fsoObject.CreateTextFile(new_path & "reports\" & session.SessionID & ".csv",true)

I think I have set the grants to include this but have been unable to get the "Show grants option" to work.
Thanks for any help you can give.
Smokey Joe
 
Is this in VB6?
Are you trying to create a file with the session id on the MySQL database?
Your access denied error may be coming from VB. What is the error number?
 
I am using ASP. The following is the complete code. It is a sample of how to convert from a MySQL query to a delimited file.

<%@ Language=VBScript %>
<html>
<head>
<meta name=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio .NET 7.1&quot;>
</head>
<body>
<%
server_path=split(Request.ServerVariables(&quot;PATH_TRANSLATED&quot;),&quot;\&quot;)

for x= 0 to ubound(server_path)-1
new_path=new_path & server_path(x) & &quot;\&quot;
next

delimeter=&quot;,&quot;
replacement_char=&quot;*&quot;
set fsoObject=Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)
Response.Write(new_path & &quot;reports\&quot; & session.SessionID & &quot;.csv&quot;)

set filObject=fsoObject.CreateTextFile(new_path & &quot;reports\&quot; & session.SessionID & &quot;.csv&quot;,true)
filObject.write &quot;Tracking Number&quot;&delimeter&&quot;Status&quot;
filObject.write vbcr
out_data=&quot;A&quot;
out_data=out_data&delimeter&&quot;B&quot;
'out_data=out_data&trim(RSfield(&quot;Close_Stamp&quot;))&delimeter
filObject.write out_data
filObject.write vbcr

'cn.close
filObject.close
%>
<br>
Click <a href=&quot;./reports><%=session.SessionID%>.csv&quot;>here</a> to view.
</body>
</html>


Thanks for your help.

Smokey Joe
 
Is it possible the user running the script (assuming the webserver process owner) doesn't have write access to the reports/ directory? Not sure how all that works in Win2k. *nix comes with a simple 'chown' and 'chmod' ;-)

----
JBR
 
Thanks to all of you who answered.

Finally got it working. It was IUSER did not have the proper permissions.

Thanks again.
Smokey Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top