6 Replies Latest reply on Feb 14, 2013 11:18 AM by WolfShade

    CF9 - CFDIRECTORY returning blank

    WolfShade Level 4

      Hello, everyone.

       

      I read (somewhere) that if CF is installed and run under a local account, then it cannot utilize CFDIRECTORY.

       

      So I followed the instructions to add an account to my Win7 system for CF9, gave it administrator status, switched CF to run under this account, and restarted CF9 Application Server.

       

      But CFDIRECTORY is still returning a blank object.  The path is correct (although C:/CF9/wwwroot looks odd to my MS conditioned eyes).

       

      Any suggestions on how to get CFDIRECTORY to work?

       

      ^_^

        • 1. Re: CF9 - CFDIRECTORY returning blank
          Reed Powell Level 3

          Not sure what "administrator status" is referring to, since there are multiple levels of admin capabilities.  Did you give it local admin or domain admin privs?  If it is a local admin, then it won't have access to directories on another server.  You will need to go to that server and specifically give that user access privs to the directories you want it to be able to read.

           

          -reed

          • 2. Re: CF9 - CFDIRECTORY returning blank
            Dan Bracuk Level 5

            The path looks odd to my eyes too.  It would look normal with backslashes instead of forward slashes.

            • 3. Re: CF9 - CFDIRECTORY returning blank
              WolfShade Level 4

              Win7 Pro, standalone.  Admin permissions that go with being in the Administrator group.  Not trying to access directories of other servers, this is purely local.

               

              ^_^

              • 4. Re: CF9 - CFDIRECTORY returning blank
                Reed Powell Level 3

                I've never had a problem with CF not being able to use CFDIRECTORY/etc tags for directories and files on the local machine, with the CF service running under the default service account (ie, no changes from how it was installed).  Did you try to use CFDIRECTORY before changing to the non-service account?  If not, give that a try - it will show whether the problem is with the permissions on the user you setup.

                 

                The forward slashes might look odd, but CFDIRECTORY doesn't care.

                 

                Can you show us the code that you are executing, and the output?

                 

                -reed

                • 5. Re: CF9 - CFDIRECTORY returning blank
                  WolfShade Level 4

                  I did try the CFDIRECTORY before creating a CF account, and they are both blank.  I'm just trying to figure out what could be causing a blank response.  The recurse attribute is set to "yes".

                   

                  So I cannot conclusively state that the account is or is not making a difference - it's most likely something else, then.  But what else could prevent the directory list?

                   

                  Unfortunately, I cannot copy/paste code, here, as my dev system is isolated from the internet, and I can't xfer code (no CD buring permission, and flash drives are proscribed.)

                   

                  But I can manually enter relevant code (thankfully, it's not 1000 lines, or more.)

                   

                  <cfdirectory action="list" directory="C:\CF9\wwwroot\" name="fileList" sort="dateLastModified, name, type" recurse="no">

                  <cfdirectory action="list" directory="C:/CF9/wwwroot/" name="fileList" sort="dateLastModified, name, type" recurse="no">

                   

                  I've tried both of the above (both with the default account, and the account I created for CF9), followed by <cfdump var="#fileList#" expand="yes">, and both are returning empty objects.

                   

                  ^_^

                  • 6. Re: CF9 - CFDIRECTORY returning blank
                    WolfShade Level 4

                    And.. here's something..

                     

                    This is the situation on my local CF server (which resides on my dev system).  If I push the same file to another CF server in our development environment, it works fine.

                     

                    ^_^