Author |
Message
|
dutchman |
Posted: Mon Sep 07, 2009 1:27 am Post subject: MO73 delete failed with error code 5 |
|
|
Acolyte
Joined: 15 May 2001 Posts: 71 Location: Netherlands
|
Hi guys. Any of you seen this error before:
delete failed with error code 5
I think it's probably reported by the Win 2003 OS rather than the util, but I might be wrong.
I can manually delete the logs, so this suggests there is no issue in terms of security.
MQ version 7.0.0.1
Regards ... Ruud |
|
Back to top |
|
 |
exerk |
Posted: Mon Sep 07, 2009 2:19 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
SupportPac site says: 5.3, 6.0
EDIT: Might be worth contacting the author to determine whether there is any impending support for V7.0, or whether there is any functional difference. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
dutchman |
Posted: Mon Sep 07, 2009 5:34 am Post subject: MO73 delete failed with error code 5 |
|
|
Acolyte
Joined: 15 May 2001 Posts: 71 Location: Netherlands
|
Thx for letting me know it doesn't mention v7! Someone else had installed it in our team but I should have checked. I've hunted around for the author but so far no luck. Seems he's based in Australia but every weblink I've found has his email dummied out
Anyone? |
|
Back to top |
|
 |
exerk |
Posted: Mon Sep 07, 2009 5:47 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
PM me please as I may have found a couple of addresses for him. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
dogbert64 |
Posted: Fri Jun 04, 2010 12:07 pm Post subject: |
|
|
Acolyte
Joined: 11 Jun 2003 Posts: 58
|
exerk wrote: |
PM me please as I may have found a couple of addresses for him. |
Did the Dutchman ever get a resolution on this? I'm running the script on Win2003 against MQ 6.0.2.5 and getting the exact same thing, even though my userid is a Local Administrator on the MQ Server. The error code 5 translates to Access Denied, even though I have the ability to delete the log files manually. |
|
Back to top |
|
 |
exerk |
Posted: Fri Jun 04, 2010 12:38 pm Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Not via me I'm afraid... _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
dogbert64 |
Posted: Mon Jun 07, 2010 10:42 am Post subject: |
|
|
Acolyte
Joined: 11 Jun 2003 Posts: 58
|
Okay, for those who are interested, I'd determined what's going on with the MO73 script, but not why. Below is the code in the vbscript file which actually deletes the log files. I've determined that the File.Delete command does 2 things when I run it: 1) it actually deletes the first log while which should be deleted and 2) it - for some reason - returns a code of 5, which means Access Denied. That return code causes script to quit, so only the first log file gets deleted (per run of the script).
I can slide around the error by commenting out the quit function, but that is a kludge and I don't like doing that. I don't know why it tells me I don't have access to delete a file, but then deletes it anyways. By the way, I can manually delete the log files, so the security rights aren't a problem.
sub Fdelete
C2Date = File.DateCreated
M2Date = File.DateLastModified
If C2Date > C1Date then
print (FileName & ".LOG NOT deleted - Created(" & C2Date & ") after the cutoff file")
exit sub
end if
if M2Date > M1Date then
print (FileName & ".LOG NOT deleted - Modified(" & M2Date & ") after the cutoff file")
exit sub
end if
If DelFlag = "Y" then
File.Delete
if err then
Print(FileName & ".LOG delete failed with error code " & err)
Wscript.quit(1)
else
Print(Filename & ".LOG deleted successfully ")
end if
else
Print(Filename & ".LOG is due for deletion")
end if
end sub |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jun 07, 2010 2:00 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Phil,
Could that be that it deletes the file because you have the corresponding rights on the directory but throws the error because your user does not have the delete rights on the file itself?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|