Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Premission Denied error

Status
Not open for further replies.
Oct 21, 2003
19
US
Hey guys I get the following error when I run a VBS Logon Script through Active Directory:

Line: 19
Char: 1
Error: Premissions Denied
Code: 800A0046
Source: Microsoft VBScript Runtime Error

This is the Script I'm running:

Dim objFSO
Dim strSource, strTarget, bOverwrite

'Set this to True, b/c any GRC.DAT that exists in this folder we want to overwrite
bOverwrite = True

'The GRC.DAT is located in the VPHOME or VPLOGON share on the server that is running System Center
strSource = "\\Server\VPLOGON\GRC.DAT"

'Set the target to be the All Users folder in Documents and Settings. (the folders is still called Norton AntiVirus Corporate Edition\7.5 even in version 8.1)

strTarget = "C:\Documents and Settings\All Users\Application Data\Symantec\Norton AntiVirus Corporate Edition\7.5"

'Create the file system object, this is the scripting object used For file handling
Set objFSO = CreateObject("Scripting.FileSystemObject")

'Copy the file
objFSO.CopyFile strSource, strTarget, bOverwrite
'Clean up
Set objFSO = Nothing


Any Ideas?
 
You are getting the error on this line

objFSO.CopyFile strSource, strTarget, bOverwrite

which would mean (probably) that you don't have permissions to access the specified source folder on the server.
Change your permissions on that folder.

Hope this helps,

jgjge3.gif
[tt]"Very funny, Scotty... Now Beam down my clothes."[/tt]
 
Or it may be the sourcefile that is the problem, to change permissions on file to give everyone read and write access...

Browse to the SOURCE folder.
Right-click your SOURCEFILE, and then click Property.
On the Security tab, click Add.
In the Look in drop-down list, click the server name.
In the upper list box, click Everyone, click Add, and then click OK.
Make sure that the Read & Execute and Read check boxes are selected. Click OK to apply the permissions.

Hope this helps.

jgjge3.gif
[tt]"Very funny, Scotty... Now Beam down my clothes."[/tt]
 
This is a script that is ran during the Log on process through Windows 2000. Is there a way to set Server side premissions onto the folder in question?
 
I've looked at the Security premissions on that file and its set to Everyone Full access by defualt.
 
It still sounds like a permissions issue to me but could the file you're trying to overwrite be open which would generate a similar error? Can you delete the file from Explorer without an error?

Paul Bent
Northwind IT Systems
 
Actually the file is not located on my machine. It's trying to write to the all users folder within My Documents. You actually need Domain or Local admin rights to modify anything with in that folder. From all points of veiw when the script is ran from with in Active Directory I should have the premissions needed to copy the file.
 
If you are logged into another computer, is the computer your logged in to on the same domain as the target? You may have admin priveledges on the logged in computer but not on the target computer. There are also domain wide permissions to be considered (GPOs).
Make sure you log into the same domain as the target.
Make sure domain wide permissions (Those given to Organizational Units, GPOs) are correct for your situation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top