navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Delete.Folder - permission denied

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Delete.Folder - permission denied
Page: [1]
 
bobby

 

Posts: 11394
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
Delete.Folder - permission denied - 6/24/2004 0:33:41   
I'm using a basic FSO script to delete a folder on the web... but it's not working.

If I use this statement:
'Delete the file

if oDelete.FolderExists (server.mappath("\" & sold)) then
   oDelete.DeleteFolder (server.mappath("\" & sold)), true
else 
   response.redirect ("page.asp")
end if


I get this error:
 Microsoft VBScript runtime error '800a0046' Permission denied


And if I switch the file path to this:
'Delete the file

if oDelete.FolderExists ("E:\Inetpub\domain.com\" & sold) then
   oDelete.DeleteFolder ("E:\Inetpub\domain.com\" & sold), true
else 
   response.redirect ("page.asp")
end if


I get this error:
Server object error 'ASP 0177 : 800a0046'

Server.CreateObject Failed

/solditem.asp, line 71

The operation completed successfully. 


Is there a server permission that needs to be set to allow for deleting a file or folder? I've played around, and everything else works fine in FSO on this server... just not DELETE

On another site I run, I've used this same script and it works fine... I just asked the host to set up FSO permissions.

Very frustrating... any ideas?

(The server is IIS 5)

_____________________________

If con is the opposite of pro, is Congress the opposite of progress?


:)
fatlardo

 

Posts: 76
Joined: 4/15/2004
From: Shrewsbury
Status: offline

 
RE: Delete.Folder - permission denied - 6/24/2004 3:55:45   
I've had a similar problem with one of my websites. Try setting permissions for everyone to have full control, this should allow your website to delete the folder. Also do the same to any files inside. Im not sure if it'll work but it should be worth a try.

(in reply to bobby)
bobby

 

Posts: 11394
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: Delete.Folder - permission denied - 6/24/2004 11:01:30   
It looks like that will do it, thanks fatlardo!

_____________________________

If con is the opposite of pro, is Congress the opposite of progress?


:)

(in reply to fatlardo)
dpf

 

Posts: 7123
Joined: 11/12/2003
From: India-napolis
Status: offline

 
RE: Delete.Folder - permission denied - 6/24/2004 11:05:48   
quote:

thanks fatlardo

I know a few people I have secretly wanted to say that to...lol

_____________________________

Dan

(in reply to bobby)
bobby

 

Posts: 11394
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: Delete.Folder - permission denied - 6/30/2004 16:40:42   
just a little update in case it helps anybody...

Server permissions only changed the error. In order to fix this, I had to change the name of the cookie.

Once that was done, things started working fine again. Though the database had to be compacted / repaired...

:)

_____________________________

If con is the opposite of pro, is Congress the opposite of progress?


:)

(in reply to bobby)
SerenityNet

 

Posts: 1368
Joined: 6/12/2001
From: Allen, TX, USA
Status: offline

 
RE: Delete.Folder - permission denied - 6/30/2004 19:49:37   
I know you've got it solved, but just in case it is useful, I have some input.

I've used the following code as an SSI successfully on several sites. I like it, because I don't have to get the host to change permissions on any directory.

Andrew


<%
'does the session know the user?
UserID=Session("UserID")
If IsEmpty(UserID) Or IsNull(UserID) Or UserID="" Then
	'we need authentication -- is the browser authenticated?
	UserID=Request.ServerVariables("LOGON_USER")
	If IsEmpty(UserID) Or IsNull(UserID) Or UserID="" Then
		'nope. reply with a 401
		Response.Status="401 Access Denied"
		Response.Status="401 Access Denied"
%>
<% response.write "<br><br><br><b>       Sorry, but your username and password combination was incorrect."
   response.write "<br><br>       Press your refresh button to try again.</b>"
%>
<%
		Response.End
	Else
		'yes, they're authenticated 
		'Translate to DOMAIN/USER format, adding default domain if necessary
		UserID=Replace(UserID, "\", "/")
		If InStr(UserID, "/")<1 Then
			UserID="defaultdomain/" & UserID
		End If
		'now tell the session about it
		Session("UserID")=UserID
	End If
End If
%>


_____________________________

</Chaos, panic, & disorder - my work here is done.>

(in reply to bobby)
bobby

 

Posts: 11394
Joined: 8/15/1969
From: Seattle WA USA
Status: offline

 
RE: Delete.Folder - permission denied - 7/1/2004 11:45:40   
I just may have to give that a shot..

thanks
:)

_____________________________

If con is the opposite of pro, is Congress the opposite of progress?


:)

(in reply to SerenityNet)
SerenityNet

 

Posts: 1368
Joined: 6/12/2001
From: Allen, TX, USA
Status: offline

 
RE: Delete.Folder - permission denied - 7/1/2004 13:30:45   
Let me know how it works for you. So-far-so-good for me, but I'm still learning this NTLM stuff.

Andrew


PS. Of course you have to be using IE. :)

< Message edited by SerenityNet -- 7/1/2004 13:31:40 >


_____________________________

</Chaos, panic, & disorder - my work here is done.>

(in reply to bobby)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Delete.Folder - permission denied
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts