Created
May 15, 2015 15:53
-
-
Save jamiejackson/b2f854f3fe6e38f32a6a to your computer and use it in GitHub Desktop.
Lucee 4.5.1.000 Problem with S3 Directory Listing: "exists, but isn't a directory"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
base = "s3://MYKEY:MYSKEY@/files-stage.mysite.com"; | |
writeDump( | |
var = directoryList( base ), | |
label = "directoryList(#base#)", | |
output = "console" | |
); | |
dir = base & "/reports"; | |
writeDump( | |
var = directoryList(dir), | |
label = "directoryList()", | |
output = "console" | |
); | |
file = base & "/a/foo.txt"; | |
writeDump( | |
var = fileRead( file ), | |
label = "fileRead(#file#)", | |
output = "console" | |
); | |
dir = base & "/a"; | |
writeDump( | |
var = directoryList(dir), | |
label = "directoryList()", | |
output = "console" | |
); | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
directoryList(s3://MYKEY:MYSKEY@/files-stage.mysite.com) | |
Array | |
1 | |
string s3://MYKEY:MYSKEY@/files-stage.mysite.com/1 | |
2 | |
string s3://MYKEY:MYSKEY@/files-stage.mysite.com/a | |
3 | |
string s3://MYKEY:MYSKEY@/files-stage.mysite.com/level1 | |
4 | |
string s3://MYKEY:MYSKEY@/files-stage.mysite.com/reports | |
5 | |
string s3://MYKEY:MYSKEY@/files-stage.mysite.com/test | |
directoryList() | |
Array | |
1 | |
string s3://MYKEY:MYSKEY@/files-stage.mysite.com/reports/conplans | |
2 | |
string s3://MYKEY:MYSKEY@/files-stage.mysite.com/reports/conplans_old | |
3 | |
string s3://MYKEY:MYSKEY@/files-stage.mysite.com/reports/test | |
fileRead(s3://MYKEY:MYSKEY@/files-stage.mysite.com/a/foo.txt) | |
string hello there | |
==> /var/www/vmhost/apps/mysite/cfml/deployment_root/wwwroot/WEB-INF/lucee/logs/exception.log <== | |
"ERROR","http-bio-8888-exec-6","05/15/2015","10:46:14","",";file [s3://MYKEY:MYSKEY@/files-stage.mysite.com/a] exists, but isn't a directory;file [s3://MYKEY:MYSKEY@/files-stage.mysite.com/a] exists, but isn't a directory | |
at lucee.runtime.tag.Directory.actionList(Unknown Source):-1 | |
at lucee.runtime.functions.file.DirectoryList.call(Unknown Source):-1 | |
at lucee.runtime.functions.file.DirectoryList.call(Unknown Source):-1 | |
at test.s3.untitled_cfm$cf.call(/var/www/vmhost/apps/mysite/cfml/deployment_root/wwwroot/test/s3/untitled.cfm:26):26 | |
at lucee.runtime.PageContextImpl.doInclude(Unknown Source):-1 | |
at lucee.runtime.PageContextImpl.doInclude(Unknown Source):-1 | |
at lucee.runtime.listener.ModernAppListener._onRequest(Unknown Source):-1 | |
at lucee.runtime.listener.MixedAppListener.onRequest(Unknown Source):-1 | |
at lucee.runtime.PageContextImpl.execute(Unknown Source):-1 | |
at lucee.runtime.PageContextImpl.execute(Unknown Source):-1 | |
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(Unknown Source):-1 | |
at lucee.loader.servlet.CFMLServlet.service(Unknown Source):-1 | |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727):727 | |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303):303 | |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208):208 | |
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52):52 | |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241):241 | |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208):208 | |
at org.apache.catalina.filters.RemoteIpFilter.doFilter(RemoteIpFilter.java:834):834 | |
at org.apache.catalina.filters.RemoteIpFilter.doFilter(RemoteIpFilter.java:870):870 | |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241):241 | |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208):208 | |
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220):220 | |
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122):122 | |
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504):504 | |
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170):170 | |
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103):103 | |
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116):116 | |
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421):421 | |
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074):1074 | |
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611):611 | |
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314):314 | |
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142):1142 | |
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617):617 | |
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61):61 | |
at java.lang.Thread.run(Thread.java:745):745 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": [ | |
"s3:ListAllMyBuckets", | |
"s3:GetBucketLocation" | |
], | |
"Effect": "Allow", | |
"Resource": "arn:aws:s3:::*" | |
}, | |
{ | |
"Action": [ | |
"s3:ListBucket", | |
"s3:ListBucketMultipartUploads", | |
"s3:ListBucketVersions" | |
], | |
"Effect": "Allow", | |
"Resource": [ | |
"arn:aws:s3:::files-stage.mysite.com", | |
"arn:aws:s3:::files-stage.mysite.com/*" | |
] | |
}, | |
{ | |
"Action": [ | |
"s3:AbortMultipartUpload", | |
"s3:DeleteObject", | |
"s3:DeleteObjectVersion", | |
"s3:GetObject", | |
"s3:GetObjectAcl", | |
"s3:GetObjectVersion", | |
"s3:GetObjectVersionAcl", | |
"s3:ListMultipartUploadParts", | |
"s3:PutObject", | |
"s3:PutObjectAcl", | |
"s3:PutObjectVersionAcl", | |
"s3:RestoreObject" | |
], | |
"Effect": "Allow", | |
"Resource": [ | |
"arn:aws:s3:::files-stage.mysite.com/*" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment