Solved

CFFILE Copy command errors with "Access is denied"

Posted on 2006-11-01
10
2,243 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
  • 5
  • 5
10 Comments
 
LVL 13

Accepted Solution

by:
usachrisk1983 earned 450 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Login using that service account, can you access the remote file?
0
 
LVL 13

Expert Comment

by:usachrisk1983
Comment Utility
... WITHOUT reauthenticating.
0
 

Author Comment

by:DMontgomeryNGC
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 13

Expert Comment

by:usachrisk1983
Comment Utility
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
Comment Utility
I have forwarded your comments to them.
I appreciate the time you are spending on this.
0
 

Author Comment

by:DMontgomeryNGC
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

728 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

14 Experts available now in Live!

Get 1:1 Help Now