Solved

Copy permission issue from server to server

Posted on 2006-07-11
9
314 Views
Last Modified: 2013-12-16
I need to copy a file from a server to another.  They are on the same network.  The source path is \\intranet\dfs\HR\EMPList.xls, and the target path is
\\IntraEDU\E:\EMPData.    This copy needs to done daily by the "system" (ColdFusion server).   I tried to copy and paste manually.  It worked for me.  Obviously, I have the full permissions to do so.  Then, when it is run on the Scheduled Task or Web Browser (ColdFusion web pages), it returns "Access is denied".
How do you find and check the account running the job and give the full permission for the copy?

any ideas?
0
Comment
Question by:ethanjohnsons
  • 3
  • 3
  • 3
9 Comments
 
LVL 33

Expert Comment

by:NJComputerNetworks
ID: 17084575
In schedule task, you can select to run the command with other user RIGHTs.  
0
 
LVL 33

Assisted Solution

by:NJComputerNetworks
NJComputerNetworks earned 50 total points
ID: 17084595
0
 
LVL 33

Expert Comment

by:NJComputerNetworks
ID: 17084609
troubleshoot schedule takss:  http://www.jsifaq.com/SUBK/TIP5300/rh5324.htm
0
 
LVL 14

Expert Comment

by:canali
ID: 17085381

If u set correctly the "run as" in Scheduled Task (local system account cannot access network shares) it's a solution (follow the NJ suggestion)

the other is change the coldfusion running context  (using a different user with less privilege than system account)
so u have more security and your copy running also from web browser....

ColdFusion installs this account by default using the LocalSystem account. The built-in LocalSystem user account has a high level of accessibility; it is part of the Administrators group. If a worker process identity runs as the LocalSystem user account, that worker process has full access to the entire system.
look at
To run the ColdFusion MX 7 application server using a specific non-administrative account, follow these instructions:
http://www.adobe.com/devnet/coldfusion/articles/cf7_security_04.html

http://www.adobe.com/cfusion/knowledgebase/index.cfm?event=view&id=KC.tn_17029&extid=tn_17029&dialogID=33340755&iterationID=1&sessionID=483048129ca05d451422&stateID=0+0+33346385&mode=simple

How to access network files from IIS applications:
http://support.microsoft.com/kb/207671/en-us

gas
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:ethanjohnsons
ID: 17099740
I am still unclear what to be done.
W/O thinking of ColdFusion for a moment, how do you transfer the file from a server to a server with a regular schedule.
Can DOS or .BAT handle it?
0
 
LVL 14

Accepted Solution

by:
canali earned 450 total points
ID: 17100126
create a cmd ex: copyFile.cmd
copy \\intranet\dfs\HR\EMPList.xls \\IntraEDU\E$\EMPData
::end batch

copy the batch in yuor c:\temp and create the scheduled task via scheduled task wizard or from the command prompt (only xp or 2003)
::this is the command to create task "running the batch copyFile.cmd as administrator every days at 8:30AM":
SCHTASKS /Create /SC DAILY  /TN "Copy xls file"  /TR c:\temp\copyFile.cmd /ST 08:30  /RU administrator /RP


Gas

to access \\IntraEDU\E$ u need administrator privileges!!! so the tusk need to run in admin context!!
0
 

Author Comment

by:ethanjohnsons
ID: 17105623
great!!!!

I want to rename the file and then copy so thay I can keep the prior files.

rename \\IntraEDU\E$\EMPData\EMPList.xls  EMPList**with the Date&Time or unique number**.xls

copy \\intranet\dfs\HR\EMPList.xls \\IntraEDU\E$\EMPData

The issue is how to make unique file names, EMPList**with the Date&Time or unique number**.xls?
"EMPList+Date&Time+.xls would be the best.
0
 
LVL 14

Expert Comment

by:canali
ID: 17118463
Should be ok:

@echo off
set $tok=1-3
::set DD=year+mounth+day
for /f "tokens=1 delims=.:/-, " %%u in ('date /t') do set $d1=%%u
if "%$d1:~0,1%" GTR "9" set $tok=2-4
for /f "tokens=%$tok% delims=.:/-, " %%u in ('date /t') do (
     for /f "skip=1 tokens=2-4 delims=/-,()." %%x in ('echo.^|date') do (
        set %%x=%%u
        set %%y=%%v
        set %%z=%%w
        set DD=%%w%%v%%u
        set $d1=
        set $tok=
     )
)
::set TT hour+minuts
for /f %%t in ('time /t') do set TT=%%t
echo %DD%%TT%
copy \\intranet\dfs\HR\EMPList.xls \\IntraEDU\E$\EMPData\EMPList%DD%%TT%.xls
:: byeGas
0
 

Author Comment

by:ethanjohnsons
ID: 17205337
great!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…

705 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

19 Experts available now in Live!

Get 1:1 Help Now