Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Permission Denied
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Permission Denied

 Post Reply Post Reply Page  12>
Author
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Topic: Permission Denied
    Posted: 27 August 2003 at 6:49pm

I'm trying to execute the command "filesystemobject.copyfile". But every time i try it gives me a permission denied error. I've checked the permissions on the folder i'm copying to and it's set to "full control" i have no idea what is wrong. The code is as follows,

<%
   Response.Write "Please wait, now adding the comics to the database. <br><br><br>"
  
   Dim conn
   Set conn = Server.CreateObject("ADODB.Connection")
   conn.provider = "Microsoft.Jet.OLEDB.4.0"
   conn.open "c:\_db\database.mdb"
  
   Dim rs
   Set rs = Server.CreateObject("ADODB.Recordset")
   rs.open "SELECT * FROM [comic]", conn, 1
  
   Dim fso
   Set fso = Server.CreateObject("Scripting.FileSystemObject")
  
   Dim sf
   Set sf = fso.GetFolder("C:\Documents and Settings\Administrator\Desktop\Comics")
  
   Dim fn
   'fn = rs.recordcount
  
   Function search(strSearchText)
   'loop through every file in the folder
      For Each objFile in sf.Files
         Dim txt
         Set txt = fso.OpenTextFile(objFile.path, 1)
  
   Dim endloop  
         While NOT endloop
      line = txt.ReadLine
   If InStr(1, line, strSearchText, 1) then
      Dim line2, fname
      endloop = TRUE
      fn = fn + 1
      fname = "c:\comics\" & fn & ".gif"
      line2 = Replace(line, "<IMG SRC=""http://www.funnymail.com/webdata/cs/", "")
      line2 = Replace(line2,"""></P>","")
      line2 = Replace(line2,".gif", "[1].gif")
               mrpath = Trim("C:\comics\2change\") & Trim(line2)
      Response.Write mrpath & " will be saved as " & fname & "<br>"
      Response.Write "Saving...<br>"
      fso.copyfile mrpath, "c:\comics"
   End If
   Wend
   endloop = FALSE
  
         txt.Close
      Next
   End Function
  
   strtxt = "<IMG SRC=""http://www.funnymail.com/webdata/cs"
     
   Search strtxt
%>

does anyone see anything that i don't?

Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2003 at 6:51pm

oops, i forgot the error

Microsoft VBScript runtime error '800a0046'

Permission denied

/scripts2save/comicadder2.asp, line 42

line 42 is 'fso.copyfile mrpath, "c:\comics"

Back to Top
Phat View Drop Down
Senior Member
Senior Member


Joined: 23 February 2003
Status: Offline
Points: 386
Post Options Post Options   Thanks (0) Thanks(0)   Quote Phat Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2003 at 8:22pm

Sounds like you don't have the correct permissions for the folder. Just a guess though.

 

Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2003 at 8:29pm
did you read the beginning of my post? I'm positive the permissions are correctly set. WRITE permissions are given to that folder and all it's sub-folders
Back to Top
Bunce View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 April 2002
Location: Australia
Status: Offline
Points: 846
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bunce Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2003 at 11:04pm

Just because you said it, doesn't mean its out of the question.  Count the number of times that posters have said they've got the correct permissions set on this forum, only to find that they didn't apply it to the IUSR_<MachineName> account.

That said, you might want to ensure that there are no script blocking utilities running on the server, such as Nortons, as this is known to interfere with FSO.

Cheers,
Andrew

There have been many, many posts made throughout the world...
This was one of them.
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2003 at 10:31am

It's funny, i have my iUSR permissions set correctly and my firewall and AntiVirus software are set to allow script execution. The weird thing is that my scripts have been giving me some really strange errors lately. Stuff like "No Current Record" when i'm not accessing a database and this "Permission Denied" error. Maybe that blaster worm currupted some of my asp.dll file, what do you think are the chances of that?

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2003 at 10:53am

how about just doing something simple like trying to disable Antivirus first?

then you don't have to (wrongly) jump to conclusions of corrupt dll's

Contribute to the working anarchy we fondly call the Internet
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2003 at 11:27am

If its norton you dont need to completely kill it just turn off script blocking.

Mart.

Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.