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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permission denied - filesystemobject

Status
Not open for further replies.

jenjon

Programmer
Jan 9, 2004
7
0
0
CA
Hi, I am trying to create a new file using fso but get permission denied. I have set the permissions in the IIS to read, write and execute on the folder where I want to create the file but it still doesn't work. I have also tried to shut down my anti virus program - no success. I am trying to do this all local on my computer with Windows XP pro installed, what am I missing?

Cheers
Jennie
 
You need to add the IUSR_machinename user also in the rights of the folder, also you would need Modify,Read,Write not Execute.

________
George, M
 
The only choice in my IIS under properties are:
script source access
v read
v write
directory browsing
v log visits
v index this resource

and under execute permissions I have:
none
v scripts only
scripts and executables

Under Directory Security / Anonymous access and authentic control
I already have IUSR_[machinename] added.

What else do I need to do?

//Jennie
 
Hi Jennie
<recap>
In IIS5 open up the interface
right click the virtual directory and click properties
click Directory Security
click edit for anonymous access
check anonymous access then the IUSR_machine name
</recap>

if that does not work then it's possible you are trying to write to a directory that does not have permissions set yet.

if you are writing to a folder per say in C:\My Doc's etc... then that folder needs write permissions. right click it and ensure that is done.

also validate that you have the correct parameters in the call to CreateTextFile




_____________________________________________________________________
onpnt2.gif
[sub]
The answer to your ??'s may be closer then you think.
Check out Tek-Tips knowledge bank by clicking the FAQ link at the top of the page
[/sub]
 
also, you said shut down the firewall. did you disable it or jsut close it?

_____________________________________________________________________
onpnt2.gif
[sub]
The answer to your ??'s may be closer then you think.
Check out Tek-Tips knowledge bank by clicking the FAQ link at the top of the page
[/sub]
 
Thanks for your answers, but it is still not working :-(
I have added IUSR_machinename set the permissions and all but still &quot;permission denied&quot;
My code:
dim fs,tfile
set fs=Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)
set tfile=fs.CreateTextFile(&quot;C:\Inetpub\tfile.WriteLine(&quot;Hello World!&quot;)
tfile.close
set tfile=nothing
set fs=nothing

Cheers
Jennie
 
Hi jennie:

Did it finally worked??? becuase I have the same problem, but my story is a little different. First my code used to work on my local server using windows 2000, but then I changed computer and the new system (windows XP)reads the code and hangs just there without doing nothing... I don´t know what could be happening...could be probable the XP operating system???

Thanks for you attention.

Liliana
 
Do you have a Firewall or Anti virus running?

try faq333-5089

___________________________________________________________________
[sub]
The answer to your ??'s may be closer then you think. faq333-3811
Join the Northern Illinois/Southern Wisconsin members in Forum1064
[/sub]
 
Hi Have you solved your problem with FileSystemObject and Win XP I am having the same problem and it is driving me up the wall now. I have done all the Permission settings and everything but still not working.

If you have a solution to this problem please let me know because I am dying over here!

Regards,
Chop24
 
Check if by mistake you have the rights of any folder in inetpub with inheritable permission from the parent folder.

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
In the folder in IIS i set the permission for the parent folder.

One thing I noticed was that when i right click the folder in explorer and try to de-select Read Only and click apply and then go to properties again the read Only does not go away??

Could that have something to do with it?

Regards,
Chop24
 
Yes you have inheritable rights then.
Do you have 2003 or 2000 Server?

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
I am useing Win Xp Pro.

Thanks for taking the time...

 
With MSAccess there's issues with the temp file, and if the file isn't WRITTEN ( FSO ) then it's deleted, and in order for FSO to be happy you need to also include delete permissions ( general permissions "modify/change" )

if this still doesn't work, verify in your winnt/system32 folder that scrrun32.dll is 5.0+ on version, registered, AND that it has system permissions.

verify the folder you're attempting to run from ( where the web page is ) has change permissions as well as the folder you're writing to ( if different )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top