2 Replies Latest reply: Jun 6, 2011 8:37 AM by Reed Powell RSS

    cfdirectory to other servers

    Dan Bracuk Community Member

      My eventual goal is to access a file on a sharepoint server, but for now I want to access one on the same server on which coldfusion is running.  If I do this,

       

      PathToFile = "d:\shared_folder_name\actual_folder_name\";

      </cfscript>
      <cfdirectory directory="#pathtofile#" name="x">
      <cfdump var="#x#" metainfo="no" abort>

       

      I can see the contents of folder.  When I look at the permissions on that folder I see that ColdFusion has read, write, list directory contents, and execute.  However, all my attempts to see the contents using unc syntax result in an empty query.  These attempts include:

       

      \\server_name\shared_folder_name\actual_folder_name\

      \\server_name\actual_folder_name\

      plus some attempts that included the drive, with and without a colon.

       

      What am I doing wrong?

        • 1. Re: cfdirectory to other servers
          Owain North Community Member

          Does the user CF is running as have network share permissions?

          • 2. Re: cfdirectory to other servers
            Reed Powell MeganK

            More specifically, if you are running an OS earlier than Windows-2008, you want to be sure that CF services are not running as the default service account, which is how the installer will leave them.  Prior to Win2008, that account has no network privs.  In the Windows Services menu, click on the CF services and look at the login info - that's where you can change the account to one that is a domain account with network privs.  It seems that Win2008 no longer has such a restrictive local service account - we just installed a couple of new servers running Win2008, forgot to change the account for the CF services, and then realized that everything was working just fine!

            -reed