Skip to main content
Inspiring
October 23, 2008
Question

directory deletion problem?

  • October 23, 2008
  • 3 replies
  • 639 views
I was trying to delete the directory when i encountered
th wired error:

The error is:

The following information is meant for the website
developer for debugging purposes.
Error Occurred While Processing Request
Security: The requested template has been denied access
to Gavy.

The following is the internal exception message: access
denied (java.io.FilePermission Gavy read)

The error occurred in E:\mydomain\index.cfm: line 80
78 :
79 : <cfif IsDefined('url.del') AND url.del EQ 'yes'>
80 : <cfdirectory action="delete" recurse="yes"
directory="#URL.dirName#">
81 : <cfset invalid = 3>
82 : </cfif>

The code i am using for this:


<a href="index.cfm?del=yes&dirName=#Name#">

#Name# is the directory name passed in the URL, but
when i try to execute this stuff, it generate error.

Can anybody guide what is happening here.

Cheers

This topic has been closed for replies.

3 replies

Inspiring
November 5, 2008
CFdirectory can;t use URL based paths, it needs to be the full path to the folder; you cant just give it the folder name.

EX: E:\folder\foldername\

You would need to pass that path like above, and plus doing it in the URL, it may get interpreted different due to URL encoding. Space, odd characters, etc may get interpreted as '%' and so forth.
tclaremont
Inspiring
October 23, 2008
I am guessing that it is a permissions issue. Keep in mind that CF is a server side language, and uses the permissions of the username that CF is set up under. So if that user does not have permissions, you are going to get access denied messages.

Like the previous poster, I also have to emphasize how dangerous your approach is.
Participating Frequently
October 23, 2008
That might be being caused by a file being used by another process or insufficient permissions to delete the file. I also strongly suggest you improve your security" What would happen if I called <a href="index.cfm?del=yes&dirName=C:\">