Solved

Accessing the database server from the web server with Coldfusion CFDIRECTORY/CFFILE

Posted on 2010-11-19
5
582 Views
Last Modified: 2012-05-10
Greetings, I have a peculiar coldfusion and CFDIRECTORY/CFFILE  file access problem. First, the situation:  This is a tale of two servers, the main one which runs the websites, and the db server. There are shared network folders between them.  To upload files such as updated webpages worked on away from the server, the files are ftp’d from the local programmer’s computer to the database server.They are then dragged & dropped from the shared folder into the main web server.There is no direct ftp path from the local programmer’s computer to the main web server.  
      The database server has a large deposit of pdf files that needs to be accessed from the main web server, without the time consuming task of transferring them manually. I can run a coldfusion program using CFDIRECTORY that works with shared network drives that originate from the main web server, but will not access shared network drives that originate from the database server.  On the database server, I can’t get the pdf files into a shared network drive that originates from the web server, which likely cancels the possibility of using a separate windows-system program that might automatically transfer the pdf files from a local directory on the db server into a shared folder.  I’m not sure if this needs permission from the database server to allow this type of access, or if this is at all possible, or maybe I need a few lessons on network drives. I don’t know if I’m simply overlooking something or if this is at all possible.  Thanks.
0
Comment
Question by:malachi223
  • 3
  • 2
5 Comments
 
LVL 52

Assisted Solution

by:_agx_
_agx_ earned 125 total points
ID: 34184261
IF I'm understanding correctly ... you have ColdFusion running on one server ( let's call it Server A ). The pdf files you want to access are on another server ( Server B ).  So on Server A, you created a mapped network drive pointing to Server B.  Correct?

Server A   =>   [Drive H:]  ... is mapped to...   \\ServerB\folderWithThePDFFiles

The CF service runs under the "System" account by default. "System" has few permissions and IIRC can't access networked drives.  The CF service has to be running under an account with permissions to your networked drive.  
0
 
LVL 1

Accepted Solution

by:
malachi223 earned 0 total points
ID: 34200813
Thank you for the reply.  Your comment was extremely helpful, not only because it gave a summary of how to resolve the situation, but it gave me good keywords to search for a solution.   Using a windows server, I clicked through start -> Administration Tools -> Services -> right clicked on ColdFusion Application Server -> Properties -> Log on -> clicked the radio button to ‘this account’  instead of the default ‘local system account’ which only allows ColdFusion to access files on the local computer, and then logged in as the server administrator.  After doing that I had to stop and restart the CF app server, after which my ColdFusion CFDIRECTORY program was able to access the shared network folders containing files from the db server.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 34202115
Glad it's working.  But you don't want to permanently run CF under the Admin account (for security reasons).  It's better to establish a separate windows account and give it the minimum permissions needed for this task. Then run the CF server under that account.  
0
 
LVL 52

Expert Comment

by:_agx_
ID: 34202130
>> Zones:  Web Servers, Application Servers

Btw:  If you have future questions about CF, they'll get more/faster attention if you include one of the CF zones when posting :)

Examples:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Cold_Fusion_Markup_Language/
http://www.experts-exchange.com/Software/Server_Software/Web_Servers/ColdFusion/

0
 
LVL 1

Author Closing Comment

by:malachi223
ID: 34399166
This required very specific knowledge of how ColdFusion file IO and accessibility.  I needed to first understand if the solution was possible, what part of cf administration had to be changed, and to what.  Most of this I was able to find on my own after I was given a good keyword to search under.
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now