Solved

CFFILE Copy command errors with "Access is denied"

Posted on 2006-11-01
10
2,262 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
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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

810 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