|
Home > Archive > IIS Server Security > February 2005 > Using a domain account as the anonymous user for file copy over network
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Using a domain account as the anonymous user for file copy over network
|
|
| Colin Steadman 2005-02-25, 5:55 pm |
| I have a VBS script which contains an array of files and locations.
The script loops through array trying to find each file in the
location specified. If found the script moves the file to another
location (typically on another server).
The script is run by Task Scheduler every few minutes, and is run
under a domain account.
What I need to do now is move this functionality into an ASP page. A
suggestion from an ASP group was to put the script into an ASP page
and move the ASP page into a new 'Virtual Folder' that runs under the
domain account I was using in Task Scheduler.
This makes good sense, but I've tried using a very simple script and
still get the following error:
Microsoft VBScript runtime error '800a0046'
Permission denied
/test_for_domain_files/domain_file_handling.asp, line 8
This is the entire ASP code it runs:
<%
CopyAFile "\\lbdb601\c$\test1.txt", "\\lbdb601\c$\test2.txt"
Sub CopyAFile(vFrom, vTo)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile vFrom, vTo, True
Set fso = Nothing
End Sub
%>
The very same code runs fine from the Desktop in a .VBS file.
Should this be possible, and if so any ideas why I'm getting the
error.
TIA,
Colin
| |
| Ken Schaefer 2005-02-27, 7:47 am |
| That would probably indicate that the script isn't running under the account
that you think it is. How have you configured the account?
Cheers
Ken
"Colin Steadman" <colin.steadman@gmail.com> wrote in message
news:52d372cd.0502250715.47542b47@posting.google.com...
:I have a VBS script which contains an array of files and locations.
: The script loops through array trying to find each file in the
: location specified. If found the script moves the file to another
: location (typically on another server).
:
: The script is run by Task Scheduler every few minutes, and is run
: under a domain account.
:
: What I need to do now is move this functionality into an ASP page. A
: suggestion from an ASP group was to put the script into an ASP page
: and move the ASP page into a new 'Virtual Folder' that runs under the
: domain account I was using in Task Scheduler.
:
: This makes good sense, but I've tried using a very simple script and
: still get the following error:
:
: Microsoft VBScript runtime error '800a0046'
:
: Permission denied
:
: /test_for_domain_files/domain_file_handling.asp, line 8
:
: This is the entire ASP code it runs:
:
:
: <%
:
: CopyAFile "\\lbdb601\c$\test1.txt", "\\lbdb601\c$\test2.txt"
:
: Sub CopyAFile(vFrom, vTo)
: Dim fso
: Set fso = CreateObject("Scripting.FileSystemObject")
: fso.CopyFile vFrom, vTo, True
: Set fso = Nothing
: End Sub
:
: %>
:
: The very same code runs fine from the Desktop in a .VBS file.
:
: Should this be possible, and if so any ideas why I'm getting the
: error.
:
: TIA,
:
: Colin
| |
| colin.steadman@gmail.com 2005-02-28, 2:48 am |
| Hi Ken,
Thanks for responding.
The account was configured for us by the domain bods for Terminal
Services and various other activities (such as this). The account is
in an admin group which admin rights to all the servers we use.
This account definately has access to the locations I'm trying to copy
files to as it worked fine as a VBS file. Which is why I'm struggling
to understand why I'm gettng this permissions denied error, its got to
be something in IIS (to my thinking). But other than confirming that
the virtual directory is using this account, and that the account can
open the locations specified I dont know what else I can do to resolve
this as my IIS knowledge is quite limit (I only use it in passing).
Any ideas?
Thanks again.
Colin
| |
| Ken Schaefer 2005-02-28, 8:01 am |
| Hi,
But how are you ensuring that IIS is using this account to perform the file
copy operation?
Cheers
Ken
<colin.steadman@gmail.com> wrote in message
news:1109580790.892138.198830@o13g2000cwo.googlegroups.com...
: Hi Ken,
:
: Thanks for responding.
:
: The account was configured for us by the domain bods for Terminal
: Services and various other activities (such as this). The account is
: in an admin group which admin rights to all the servers we use.
:
: This account definately has access to the locations I'm trying to copy
: files to as it worked fine as a VBS file. Which is why I'm struggling
: to understand why I'm gettng this permissions denied error, its got to
: be something in IIS (to my thinking). But other than confirming that
: the virtual directory is using this account, and that the account can
: open the locations specified I dont know what else I can do to resolve
: this as my IIS knowledge is quite limit (I only use it in passing).
:
: Any ideas?
:
: Thanks again.
:
: Colin
:
| |
| colin.steadman@gmail.com 2005-02-28, 8:01 am |
| Oops!
You were completely correct. I thought I'd go and have another look at
the anonymous user properties just in case! It appears I actually
wasn't using the account I thought I was, just as you suggested. It
turns out that I was using the similarly named sister account to our
admin one and couldn't see the woods for the trees.
Thank you for the prompt!
Cheers,
Colin
| |
| Ken Schaefer 2005-02-28, 8:01 am |
| Hi
Glad you got it fixed. It's always a relief when you realise that it's
something simple to fix, rather than something really complex that's going
to take hours/days to troubleshoot.
Cheers
Ken
<colin.steadman@gmail.com> wrote in message
news:1109581730.610404.21570@z14g2000cwz.googlegroups.com...
: Oops!
:
: You were completely correct. I thought I'd go and have another look at
: the anonymous user properties just in case! It appears I actually
: wasn't using the account I thought I was, just as you suggested. It
: turns out that I was using the similarly named sister account to our
: admin one and couldn't see the woods for the trees.
:
: Thank you for the prompt!
:
: Cheers,
:
: Colin
:
|
|
|
|
|