Skip to main content
Participant
June 8, 2011
Question

cfdirectory returns empty set despite full permissions?

  • June 8, 2011
  • 1 reply
  • 1742 views

I am porting a  coldfusion application from 32-bit ubuntu to 64-bit and have run into an  odd snag.  For some reason, I am able to perform file operations in a  directory but am completely unable to get a directory listing using  cfdirectory.

The CF server is Ubuntu 10.04 64-bit running  coldfusion mx7.  It is joined to active directory using centrify  express, and has the centrify samba package installed instead of regular  samba.  The directories in question actually reside on windows servers -  Windows Server 2003 and 2008.  The shares are mounted on the CF server  using the following lines in fstab:

//server2003/share /network/server1/share smbfs _netdev,noperm,credentials=/root/.smbpasswd,uid=0,file_mode=0777,dir_mode=0777   0 0
//server2008/share /network/server2008/share smbfs _netdev,noperm,credentials=/root/.smbpasswd,uid=0,file_mode=0777,dir_mode=0777   0 0

   Coldfusion jrun process is running as root.  The directories are  browsable with no apparent problems when logged in via ssh.  Coldfusion  can create new files in directories with cffile, and FileExists works  with one of the files I'm trying to list, but cfdirectory always returns  an empty list.  I tried using the undocumented FileInfo="name" option  to avoid running java's stat() command, but that yielded an empty set as  well.

After getting some advice on Experts Exchange, I tried getting a directory listing with java:

<cfset obj = createObject("java", "java.io.File").init(testPath)>
....
<cfoutput>
listRoots = #arrayLen(obj.listRoots())#<br>
listFiles = #arrayLen(obj.listFiles())#
</cfoutput>
... no dice.  Empty result sets as before, though java could see that  the parent directory was there, and obj.canRead() and obj.canWrite()  both returned True.

I think I've already summarized all I've tried, but here's a link to the  question thread on experts exchange, in case I missed something:  http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Cold_Fusion_Markup_Language/Q_27062231.html

I have no idea what's going on here... any help would be greatly appreciated!!


Thanks!

    This topic has been closed for replies.

    1 reply

    mnagleeAuthor
    Participant
    June 16, 2011

    *bump*

    Any guesses?  Crazy notions?  I've considered ritual sacrifice at this point, so any theories at all would be helpful...  I just don't know what else to try.

    Inspiring
    June 16, 2011

    Just to confirm: you're getting (basically ~) the same results with Java file operations as you are with CF's?

    That being the case, you might be better of rephrasing your question on expert-sex-change to be more Java-centric: ultimately it'll be a Java issue, and the Java community is much bigger than CF's.  Additionally, stackoverflow might be a better place to post?

    Are you in the position to install a dev version of CF9 in the same environment and test if that works any better?

    --

    Adam

    Inspiring
    June 16, 2011

    question on expert-sex-change to be more Java-centric:

    .. that just made me spit coffee all over my screen