Link to home
Start Free TrialLog in
Avatar of DMontgomeryNGC
DMontgomeryNGCFlag for United States of America

asked on

CFFILE Copy command errors with "Access is denied"

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.
ASKER CERTIFIED SOLUTION
Avatar of usachrisk1983
usachrisk1983
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DMontgomeryNGC

ASKER

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.

Login using that service account, can you access the remote file?
... WITHOUT reauthenticating.
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."
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.
I have forwarded your comments to them.
I appreciate the time you are spending on this.
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?
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.
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.