Jump to content

Recommended Posts

Guest Jim Thorne
Posted

I'm trying to use a scheduled task to robocopy files from my (old) winSrv2003

to my (new) WinSrv2008. It worked between Server2003 and Server2003 in the

past. I keep getting one of these for each source directory:

"ERROR 5 (0x00000005) Changing File Attributes <source directory listed

here> Access is denied"

The account used by the task is a member of Domain Admins.

 

--

Jim Thorne

Information Systems Manager

Aguila

  • Replies 13
  • Created
  • Last Reply

Popular Days

Guest Guy Pardoe
Posted

Re: Robocopy Errors

 

Permission issue? (not likely with Admin account).

Open file?

 

What switches are you using on the command line? Post your robocopy

command.

 

Guy

 

 

 

 

 

 

Jim Thorne wrote:

> I'm trying to use a scheduled task to robocopy files from my (old) winSrv2003

> to my (new) WinSrv2008. It worked between Server2003 and Server2003 in the

> past. I keep getting one of these for each source directory:

> "ERROR 5 (0x00000005) Changing File Attributes <source directory listed

> here> Access is denied"

> The account used by the task is a member of Domain Admins.

>

Guest Jim Thorne
Posted

Re: Robocopy Errors

 

robocopy \\Oldserver\f$\Archive e:\Archive *.* /mir /copy:dats /fft /np /r:0

/w:0 /ndl /nfl /log+:"e:\scripts\RobologS2Archive.txt"

 

The account is a member of both Domain Admins and the local Administrators

group on the source server.

 

--

Jim Thorne

Information Systems Manager

Aguila

 

 

"Guy Pardoe" wrote:

> Permission issue? (not likely with Admin account).

> Open file?

>

> What switches are you using on the command line? Post your robocopy

> command.

>

> Guy

>

>

>

>

>

>

> Jim Thorne wrote:

> > I'm trying to use a scheduled task to robocopy files from my (old) winSrv2003

> > to my (new) WinSrv2008. It worked between Server2003 and Server2003 in the

> > past. I keep getting one of these for each source directory:

> > "ERROR 5 (0x00000005) Changing File Attributes <source directory listed

> > here> Access is denied"

> > The account used by the task is a member of Domain Admins.

> >

>

Guest Danny Sanders
Posted

Re: Robocopy Errors

 

The domain admin probably does not have access to the folder being copied.

Look at the NTFS permissions on the folder in question.

 

 

hth

DDS

 

"Jim Thorne" <JimThorne@discussions.microsoft.com> wrote in message

news:20823CF0-3655-4A78-BC1C-0509458775A3@microsoft.com...

> I'm trying to use a scheduled task to robocopy files from my (old)

> winSrv2003

> to my (new) WinSrv2008. It worked between Server2003 and Server2003 in

> the

> past. I keep getting one of these for each source directory:

> "ERROR 5 (0x00000005) Changing File Attributes <source directory listed

> here> Access is denied"

> The account used by the task is a member of Domain Admins.

>

> --

> Jim Thorne

> Information Systems Manager

> Aguila

Guest Pegasus \(MVP\)
Posted

Re: Robocopy Errors

 

 

"Jim Thorne" <JimThorne@discussions.microsoft.com> wrote in message

news:FF17D870-A504-4674-90F7-58026A4A21A5@microsoft.com...

> robocopy \\Oldserver\f$\Archive e:\Archive *.* /mir /copy:dats /fft /np

> /r:0

> /w:0 /ndl /nfl /log+:"e:\scripts\RobologS2Archive.txt"

>

> The account is a member of both Domain Admins and the local Administrators

> group on the source server.

>

> --

> Jim Thorne

> Information Systems Manager

> Aguila

 

What exactly to you mean with "Account" in "The account is a member..."?

Guest Jim Thorne
Posted

Re: Robocopy Errors

 

I have an AD account called "Robocopyservice" which is a member of the Domain

Admin's group. In the Task Scheduler, under Security Options on the General

tab, I have

When running the task, use the following account:

<domainname>\Robocopyservice.

 

--

Jim Thorne

Information Systems Manager

Aguila

 

 

"Pegasus (MVP)" wrote:

>

> "Jim Thorne" <JimThorne@discussions.microsoft.com> wrote in message

> news:FF17D870-A504-4674-90F7-58026A4A21A5@microsoft.com...

> > robocopy \\Oldserver\f$\Archive e:\Archive *.* /mir /copy:dats /fft /np

> > /r:0

> > /w:0 /ndl /nfl /log+:"e:\scripts\RobologS2Archive.txt"

> >

> > The account is a member of both Domain Admins and the local Administrators

> > group on the source server.

> >

> > --

> > Jim Thorne

> > Information Systems Manager

> > Aguila

>

> What exactly to you mean with "Account" in "The account is a member..."?

>

>

>

Guest Jim Thorne
Posted

Re: Robocopy Errors

 

I have given my robocopy account (called RobocopyService) explicit Full NTFS

permissions to the root directory of the source. Permissions ARE inherited

by the sub-folders. The audit log on the source server shows RobocopyService

successfully logging on at the start of each job.

 

--

Jim Thorne

Information Systems Manager

Aguila

 

 

"Danny Sanders" wrote:

> The domain admin probably does not have access to the folder being copied.

> Look at the NTFS permissions on the folder in question.

>

>

> hth

> DDS

>

> "Jim Thorne" <JimThorne@discussions.microsoft.com> wrote in message

> news:20823CF0-3655-4A78-BC1C-0509458775A3@microsoft.com...

> > I'm trying to use a scheduled task to robocopy files from my (old)

> > winSrv2003

> > to my (new) WinSrv2008. It worked between Server2003 and Server2003 in

> > the

> > past. I keep getting one of these for each source directory:

> > "ERROR 5 (0x00000005) Changing File Attributes <source directory listed

> > here> Access is denied"

> > The account used by the task is a member of Domain Admins.

> >

> > --

> > Jim Thorne

> > Information Systems Manager

> > Aguila

>

>

>

Guest Danny Sanders
Posted

Re: Robocopy Errors

 

>I have given my robocopy account (called RobocopyService) explicit Full

>NTFS

> permissions to the root directory of the source. Permissions ARE

> inherited

> by the sub-folders.

 

That's fine and dandy. Look at the NTFS permissions on the folder you are

getting access denied on.

 

> by the sub-folders. The audit log on the source server shows

> RobocopyService

> successfully logging on at the start of each job.

 

 

All that is saying is that the account used to run the script was able to

log on and use the script. It does not have anything to do with the script

accessing the files. What are the permissions on the folder giving the

access denied errors?

 

 

hth

DDS

 

"Jim Thorne" <JimThorne@discussions.microsoft.com> wrote in message

news:3E402550-F67E-4613-A495-EDE038F57C11@microsoft.com...

>I have given my robocopy account (called RobocopyService) explicit Full

>NTFS

> permissions to the root directory of the source. Permissions ARE

> inherited

> by the sub-folders. The audit log on the source server shows

> RobocopyService

> successfully logging on at the start of each job.

>

> --

> Jim Thorne

> Information Systems Manager

> Aguila

>

>

> "Danny Sanders" wrote:

>

>> The domain admin probably does not have access to the folder being

>> copied.

>> Look at the NTFS permissions on the folder in question.

>>

>>

>> hth

>> DDS

>>

>> "Jim Thorne" <JimThorne@discussions.microsoft.com> wrote in message

>> news:20823CF0-3655-4A78-BC1C-0509458775A3@microsoft.com...

>> > I'm trying to use a scheduled task to robocopy files from my (old)

>> > winSrv2003

>> > to my (new) WinSrv2008. It worked between Server2003 and Server2003 in

>> > the

>> > past. I keep getting one of these for each source directory:

>> > "ERROR 5 (0x00000005) Changing File Attributes <source directory

>> > listed

>> > here> Access is denied"

>> > The account used by the task is a member of Domain Admins.

>> >

>> > --

>> > Jim Thorne

>> > Information Systems Manager

>> > Aguila

>>

>>

>>

Guest Guy Pardoe
Posted

Re: Robocopy Errors

 

Hi Jim,

 

My first thought was permissions too. I can only trust that you've

double-checked that correctly.

 

Since your error message refers to changing file attributes, I wonder

about the /FFT. Just taking a guess here.

 

How about the /COPY:DATS ???

 

Do you need the 'S' in DATS? Does the command succeed without it? (I

personally have never come across the example of using :DATS with /FFT.

 

Guy

 

 

Jim Thorne wrote:

> robocopy \\Oldserver\f$\Archive e:\Archive *.* /mir /copy:dats /fft /np /r:0

> /w:0 /ndl /nfl /log+:"e:\scripts\RobologS2Archive.txt"

>

> The account is a member of both Domain Admins and the local Administrators

> group on the source server.

>

Guest Jim Thorne
Posted

Re: Robocopy Errors

 

I get the Access Denied error message for each and every folder that robocopy

copies. That's 21,000 folders. 21,000 error messages in the log file for

each run.

 

On the bright side, it does seem to be copying the files to the destination

now. Earlier today when I was using /copyall (now changed to /copy:dat),

nothing copied. Now it's just filling the log with this chaff, and I don't

know why.

 

--

Jim Thorne

Information Systems Manager

Aguila

 

 

"Danny Sanders" wrote:

> >I have given my robocopy account (called RobocopyService) explicit Full

> >NTFS

> > permissions to the root directory of the source. Permissions ARE

> > inherited

> > by the sub-folders.

>

> That's fine and dandy. Look at the NTFS permissions on the folder you are

> getting access denied on.

>

>

> > by the sub-folders. The audit log on the source server shows

> > RobocopyService

> > successfully logging on at the start of each job.

>

>

> All that is saying is that the account used to run the script was able to

> log on and use the script. It does not have anything to do with the script

> accessing the files. What are the permissions on the folder giving the

> access denied errors?

>

>

> hth

> DDS

>

> "Jim Thorne" <JimThorne@discussions.microsoft.com> wrote in message

> news:3E402550-F67E-4613-A495-EDE038F57C11@microsoft.com...

> >I have given my robocopy account (called RobocopyService) explicit Full

> >NTFS

> > permissions to the root directory of the source. Permissions ARE

> > inherited

> > by the sub-folders. The audit log on the source server shows

> > RobocopyService

> > successfully logging on at the start of each job.

> >

> > --

> > Jim Thorne

> > Information Systems Manager

> > Aguila

> >

> >

> > "Danny Sanders" wrote:

> >

> >> The domain admin probably does not have access to the folder being

> >> copied.

> >> Look at the NTFS permissions on the folder in question.

> >>

> >>

> >> hth

> >> DDS

> >>

> >> "Jim Thorne" <JimThorne@discussions.microsoft.com> wrote in message

> >> news:20823CF0-3655-4A78-BC1C-0509458775A3@microsoft.com...

> >> > I'm trying to use a scheduled task to robocopy files from my (old)

> >> > winSrv2003

> >> > to my (new) WinSrv2008. It worked between Server2003 and Server2003 in

> >> > the

> >> > past. I keep getting one of these for each source directory:

> >> > "ERROR 5 (0x00000005) Changing File Attributes <source directory

> >> > listed

> >> > here> Access is denied"

> >> > The account used by the task is a member of Domain Admins.

> >> >

> >> > --

> >> > Jim Thorne

> >> > Information Systems Manager

> >> > Aguila

> >>

> >>

> >>

>

>

>

Guest Jim Thorne
Posted

Re: Robocopy Errors

 

Oops - it isn't copying the files after all. They are just there from an

earlier manual run of the script. The script works fine when run from

Windows Explorer, logged on as Administrator.

--

Jim Thorne

Information Systems Manager

Aguila

 

 

"Jim Thorne" wrote:

> I get the Access Denied error message for each and every folder that robocopy

> copies. That's 21,000 folders. 21,000 error messages in the log file for

> each run.

>

> On the bright side, it does seem to be copying the files to the destination

> now. Earlier today when I was using /copyall (now changed to /copy:dat),

> nothing copied. Now it's just filling the log with this chaff, and I don't

> know why.

>

> --

> Jim Thorne

> Information Systems Manager

> Aguila

>

>

> "Danny Sanders" wrote:

>

> > >I have given my robocopy account (called RobocopyService) explicit Full

> > >NTFS

> > > permissions to the root directory of the source. Permissions ARE

> > > inherited

> > > by the sub-folders.

> >

> > That's fine and dandy. Look at the NTFS permissions on the folder you are

> > getting access denied on.

> >

> >

> > > by the sub-folders. The audit log on the source server shows

> > > RobocopyService

> > > successfully logging on at the start of each job.

> >

> >

> > All that is saying is that the account used to run the script was able to

> > log on and use the script. It does not have anything to do with the script

> > accessing the files. What are the permissions on the folder giving the

> > access denied errors?

> >

> >

> > hth

> > DDS

> >

> > "Jim Thorne" <JimThorne@discussions.microsoft.com> wrote in message

> > news:3E402550-F67E-4613-A495-EDE038F57C11@microsoft.com...

> > >I have given my robocopy account (called RobocopyService) explicit Full

> > >NTFS

> > > permissions to the root directory of the source. Permissions ARE

> > > inherited

> > > by the sub-folders. The audit log on the source server shows

> > > RobocopyService

> > > successfully logging on at the start of each job.

> > >

> > > --

> > > Jim Thorne

> > > Information Systems Manager

> > > Aguila

> > >

> > >

> > > "Danny Sanders" wrote:

> > >

> > >> The domain admin probably does not have access to the folder being

> > >> copied.

> > >> Look at the NTFS permissions on the folder in question.

> > >>

> > >>

> > >> hth

> > >> DDS

> > >>

> > >> "Jim Thorne" <JimThorne@discussions.microsoft.com> wrote in message

> > >> news:20823CF0-3655-4A78-BC1C-0509458775A3@microsoft.com...

> > >> > I'm trying to use a scheduled task to robocopy files from my (old)

> > >> > winSrv2003

> > >> > to my (new) WinSrv2008. It worked between Server2003 and Server2003 in

> > >> > the

> > >> > past. I keep getting one of these for each source directory:

> > >> > "ERROR 5 (0x00000005) Changing File Attributes <source directory

> > >> > listed

> > >> > here> Access is denied"

> > >> > The account used by the task is a member of Domain Admins.

> > >> >

> > >> > --

> > >> > Jim Thorne

> > >> > Information Systems Manager

> > >> > Aguila

> > >>

> > >>

> > >>

> >

> >

> >

Guest Guy Pardoe
Posted

Re: Robocopy Errors

 

How about this...

 

If you're running as a service with a specified user account (from a

scheduled task for instance) and you're simultaneously logged into the

machine with another user (different from the one the service is using),

AND YOU HAVE A SHARE TO THAT SAME <oldserver> SERVER, then Windows will

disallow the remote connection to the <oldserver> using the account

specified by the service. Maybe that's poorly worded. But the bottom

line is, I don't think Windows will allow to connections to the same

remote source with two different user accounts.

 

Try logging off entirely and running your test with a schedule task.

 

Guy

 

 

Jim Thorne wrote:

> Oops - it isn't copying the files after all. They are just there from an

> earlier manual run of the script. The script works fine when run from

> Windows Explorer, logged on as Administrator.

Guest Pegasus \(MVP\)
Posted

Re: Robocopy Errors

 

That's what I thought you meant but I was not sure.

 

I would now use runas.exe to spawn a session under

the Robocopyservice account, then invoke the robocopy

command manually and watch what happens.

 

 

"Jim Thorne" <JimThorne@discussions.microsoft.com> wrote in message

news:C8BF80CE-CEFC-4F77-829D-3726693CD5B2@microsoft.com...

>I have an AD account called "Robocopyservice" which is a member of the

>Domain

> Admin's group. In the Task Scheduler, under Security Options on the

> General

> tab, I have

> When running the task, use the following account:

> <domainname>\Robocopyservice.

>

> --

> Jim Thorne

> Information Systems Manager

> Aguila

>

>

> "Pegasus (MVP)" wrote:

>

>>

>> "Jim Thorne" <JimThorne@discussions.microsoft.com> wrote in message

>> news:FF17D870-A504-4674-90F7-58026A4A21A5@microsoft.com...

>> > robocopy \\Oldserver\f$\Archive e:\Archive *.* /mir /copy:dats /fft /np

>> > /r:0

>> > /w:0 /ndl /nfl /log+:"e:\scripts\RobologS2Archive.txt"

>> >

>> > The account is a member of both Domain Admins and the local

>> > Administrators

>> > group on the source server.

>> >

>> > --

>> > Jim Thorne

>> > Information Systems Manager

>> > Aguila

>>

>> What exactly to you mean with "Account" in "The account is a member..."?

>>

>>

>>

Guest Jim Thorne
Posted

Re: Robocopy Errors

 

Got it!!!

 

In the Task Scheduler, there is a checkbox for "Run with highest

permissions". Once that is checked, everything works exactly as it should.

I was able to remove all of the explicit NTFS permissions from the source and

destination. The default setting (unchecked) seems to use some undefined

lower set of permissions to be assigned to the account, just like with UAC in

Vista.

 

Thanks for all your help with this.

 

--

Jim Thorne

Information Systems Manager

Aguila

 

 

"Guy Pardoe" wrote:

> How about this...

>

> If you're running as a service with a specified user account (from a

> scheduled task for instance) and you're simultaneously logged into the

> machine with another user (different from the one the service is using),

> AND YOU HAVE A SHARE TO THAT SAME <oldserver> SERVER, then Windows will

> disallow the remote connection to the <oldserver> using the account

> specified by the service. Maybe that's poorly worded. But the bottom

> line is, I don't think Windows will allow to connections to the same

> remote source with two different user accounts.

>

> Try logging off entirely and running your test with a schedule task.

>

> Guy

>

>

> Jim Thorne wrote:

> > Oops - it isn't copying the files after all. They are just there from an

> > earlier manual run of the script. The script works fine when run from

> > Windows Explorer, logged on as Administrator.

>


×
×
  • Create New...