|
| |
|
|
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.
|
|
|
|
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
|
|
|
|
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.>
|
|
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
|
|
|