# Permission denied for copying file

Discussion in 'ASP General' started by Wanda, Aug 11, 2004.

1. ### WandaGuest

Hi all,

I have a permission denied error when I tried to copy a file from the
local directory to another local directory by using the FSO
(FileSystem)

Set fso = createobject("scripting.fileSystemObject")
fso.CopyFile "c:\inet\wwwroot\webappname\template\aaa.doc",
"c:\inet\wwwroot\webappname\template\bbb.doc"

When I looked at the IIS setting, I have the IUSR_machinename got
setup, and have the write permission on, but I still have no idea why
I still got this error.

would be appreicated.
Wanda

Wanda, Aug 11, 2004

2. ### Ray atGuest

Have you checked the NTFS permissions in your target directory to see if
IUSR has permission to modify the directory's contents? Also make sure that
if the target file exists, that it's not read-only or in use.

Ray at work

"Wanda" <> wrote in message
news:...
> Hi all,
>
> I have a permission denied error when I tried to copy a file from the
> local directory to another local directory by using the FSO
> (FileSystem)
>
> Set fso = createobject("scripting.fileSystemObject")
> fso.CopyFile "c:\inet\wwwroot\webappname\template\aaa.doc",
> "c:\inet\wwwroot\webappname\template\bbb.doc"
>
>
> When I looked at the IIS setting, I have the IUSR_machinename got
> setup, and have the write permission on, but I still have no idea why
> I still got this error.
>
> would be appreicated.
> Wanda

Ray at, Aug 11, 2004

3. ### Wanda LiGuest

Perfect thanks, it works

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Wanda Li, Aug 11, 2004