Solved

CFFILE Copy command errors with "Access is denied"

Posted on 2006-11-01
10
2,283 Views
Last Modified: 2013-12-20
I have read several threads about this, followed the suggestions, and have not been able to solve this problem.

An exception occurred when using <cffile ... > to perform a file copy operation for a PowerPoint file from a file server (eagle) to the server that the ColdFusion Application is located on.

I am trying to copy a PowerPoint presentation from a file server to another server (where the ColdFusion application is located (D:\WWWRoot\xfp\tutorial\xfp\attachments)

Code:
    <cffile action="copy"
          source="\\eagle\app$\xfp\tutorial\Document\PDO_template.ppt"
             destination="D:\WWWRoot\xfp\tutorial\xfp\attachments\259.tmp"
          >

    <cffile action="RENAME"
            source="D:\WWWRoot\xfp\tutorial\xfp\attachments\259.tmp"
            destination="D:\WWWRoot\xfp\tutorial\xfp\attachments\259_PDO_template.ppt"
            >


I receive the following error at line  <cffile action="copy"

An exception occurred when performing a file operation
copy on files
\\eagle\app$\xfp\tutorial\Document\PDO_template.ppt and D:\WWWRoot\xfp\tutorial\xfp\attachments\259.tmp


The cause of this exception was: java.io.FileNotFoundException:
\\eagle\app$\xfp\tutorial\Document\PDO_template.ppt   (Access is denied).  


I have checked file and directory permissions and they seem to be fine.  I can open the PowerPoint presentation (size is 439KB) without any problem on “\\eagle\app$\xfp\tutorial\Document\PDO_template.ppt” by double clicking the PowerPoint file name.

Both servers are Windows 2003, ColdFusion is version MX7, PowerPoint is version 2003.
The directory names are spelled correctly; NT directory permissions are “Read & Execute”, “List Folder Content”, and “Read”.  The actual PowerPoint document also includes the “Write” permission


I would appreciate anyone’s help.
0
Comment
Question by:DMontgomeryNGC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 13

Accepted Solution

by:
usachrisk1983 earned 450 total points
ID: 17850724
Remember that ColdFusion runs (by default) as LocalSystem, which has no access to the Network.  You need an account that has access to run on the server as an administrator (actually, as a service, but this is done automagically when the account is added) as well as be able to access that network share.  Setup the CF service to run as this user, and then CF will have the same access as that user account does to the remote share.
0
 

Author Comment

by:DMontgomeryNGC
ID: 17851828
Thank you the the reply.   (Still Broken)
I am told that:
The Service Account is associated with ColdFusion services.
The Service Account is a member of the Local Administration group.

0
 
LVL 13

Expert Comment

by:usachrisk1983
ID: 17852092
Login using that service account, can you access the remote file?
0
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
LVL 13

Expert Comment

by:usachrisk1983
ID: 17852095
... WITHOUT reauthenticating.
0
 

Author Comment

by:DMontgomeryNGC
ID: 17859759
I apologize for the delay, I entered the following comment yesterday, but it apparently did not take.

This is the response I received from our Network Administration group:
"Yes…being part of the local admin group, it has interactive access.  However, we don’t log in with service accounts even if the account is permitted."
0
 
LVL 13

Expert Comment

by:usachrisk1983
ID: 17860161
Trying to login with this account is cruital to troubleshooting why the account isn't permitted access to the remote server share.  If the account is in the *local* admin group, and it is a *local* account, it probably doesn't have access to remote network shares.  If there's just no way, no how that you're going to be allowed to login using this account, you could ask your network admin group to first check the permissions on this account to make sure it has access to that share, and then have *them* login to the network using this account and trying to access the share.
0
 

Author Comment

by:DMontgomeryNGC
ID: 17860338
I have forwarded your comments to them.
I appreciate the time you are spending on this.
0
 

Author Comment

by:DMontgomeryNGC
ID: 17893707
Network Administration states that the permissions are fine.  I tried using the <cffile action = "UPLOAD” tag in another part of the program and I was able to upload and rename the same file which fails with <cffile action = "COPY" parameter.   (<cffile action = "COPY” still fails with the "access denied" error).   From this action, can I assume that the permissions are correctly set?  

I can not use the "action = UPLOAD" (Reason:  When a user enters the program and creates a new entry, preset data is saved to a Microsoft Access table and a PowerPoint presentation is copied to a specific location for the user to update (names, expected competition dates, issues and risks, etc.) as they proceed through the process.)

 The PowerPoint file is located on a remote server and is copied to the ColdFusion server.   Any thoughts from this new information?
0
 
LVL 13

Expert Comment

by:usachrisk1983
ID: 17975705
Hmm, extremely odd that it wouldn't work this way if the account has permissions.  I would suggest getting a pointer posted at this question to get some new CF Experts to take a peek.
0
 

Author Comment

by:DMontgomeryNGC
ID: 17978853
In the original answer, usachrisk1983 stated “Remember that ColdFusion runs (by default) as “Local System”, which has no access to the Network.  You need an account that has access to run on the server as an administrator (actually, as a service, but this is done automatically when the account is added) as well as be able to access that network share.  Setup the CF service to run as this user, and then CF will have the same access as that user account does to the remote share.”

(One sees the service accounts (on the server your instance is located on) by opening the Control Panel, selecting Administrative Tools, and then selecting Services.  The service account is listed in the “Log On As” column of the Services page.)

The services “ColdFusion MX 7 ODBC Agent”, “ColdFusion MX 7 ODBC Server”, and “ColdFusion MX 7 Search Server” were set to a service that had network access privileges (xxxxxx\yyc31-cfusion).  However, the ColdFusion instance of the XFP program (“Macromedia CFMX AS XFP”), which was further down in the list of services was set to the “Local System” account.  Changing “Local System” to “xxxxxx\yyc31-cfusion” corrected the “denied access” problem.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to setup ssl access to internal local machine 4 124
ColdFusion Rereplace 3 89
Connect to MS-SQL server from Linux/PHP 8 98
change time in cron 4 102
This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

697 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