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!

File Upload Error 2

Status
Not open for further replies.

jennuhw

MIS
Apr 18, 2001
426
0
0
US
Server A is my web server running Server 2003 and IIS 6. Server B is my file server running Server 2003 also. I have a script that is suppose to create a file on server B. I have followed MS's article 197964 to create the IUSR and IWAM accounts on server B and gave both of them the appropriate permissions. I also read to create a virtual directory pointing to a share of the same name on the file server. I have also gone to the point of creating a new domain user and giving them the proper permissions to the folder on server B, and I also used the connect as option and entered this user's information. I am still getting permission denied errors. I have the file path writing to the upload page, and it is correct. I have tried all of these with about every configuration that directory security has to offer in IIS. Any other ideas?

Here is my error:

Execution ended: 2/9/2005 4:05:33 PM1219.doc
\\esp10\drawingdbfiles$\test\1219.doc

Microsoft VBScript runtime error '800a0046'

Permission denied

/drawingdb/upload.asp, line 170

Here is the line that causes the error:
set fle = fso.CreateTextFile(server.MapPath("drawingdbfiles/test/" & FileName))


Thanks!
 
If you give everyone write access to the test folder, does it work???
 
No, they actually have access to that folder and the parent folder. [mad] Thanks!
 
Does that file already exist??? What happens when you try this:

set fle = fso.CreateTextFile(server.MapPath("drawingdbfiles/test/" & FileName), true)
 
I get the exact same error. There are actually no files in the directory at all.
I have actually used this same script to upload files to the same server, and it worked like a charm. So, I know that the script works fine.
 
If you have a share on Server A to Server B,..why not hardcode the path:

set fle = fso.CreateTextFile("h:/drawingdbfiles/test/" & FileName))

 
I just tried this with the mapped drive on the web server.

Now, I get:
Execution ended: 2/9/2005 4:53:39 PM
Microsoft VBScript runtime error '800a004c'

Path not found

/drawingdb/upload.asp, line 170

I can open up the mapped drive just fine on the server, and the path is correct.

Thank you so much for your help so far.
 
I would say that the path has got to still be incorrect. That error is basically saying that it is incorrect...try the following:

set fle = fso.CreateTextFile("h:/drawingdbfiles/test/test.txt")

If you still get the error, then you have to check where the file is trying to be created. I have to go, but I will check back Thursday morning...
 
I'm very novice at this so pardon if I'm being too simple, but notice slashes on first post are different. Also, by "directory security" I would presume you mean "domain security".
 
PLGREEN, the path is correct. If I go to the web server and type the path, it goes straight to that folder. So, I tried this:
set fle = fso.CreateTextFile("\\esp10drawingdbfiles$\test\" & FileName)
Now, I get permission denied again. Ugh.
 
jennuhw:

Have you checked out this knowledge base article:

Once you follow the instructions on the above knowledge base article, then do the following:

Add the local account to the guest group on the remote server

Add the guest group to the shared folder access list

I hope this helps...
 
I have went through and followed that kb article. I triple checked everything. The account I created was IUSR_ESP12 on the file server. I gave that account and the guest group access to the folders (IUSR_ESP12 already had access.) Added it to the local policy to log on locally. I tried to run the script with the logon information in the Connect As in IIS and without. Neither worked. Still getting the permission denied error. Could there be some other setting somewhere that could be causing this?
 
Well...I am getting close to running out of ideas...hummmm...when you right click on the shared folder from the webserver, and select "Sharing and Security", next select the security tab and what permissions are set for IUSR_ESP12...and for everyone else, for that matter?
 
I can't do that from the web server. I have it setup as a hidden share, so it won't show up to see the permissions. Could the hidden share be a problem??
 
That might be it,...because if you can't see it, how can the IUSR account?
 
Okay, I changed the share so it is no longer hidden. I still got the permission error. So, I decided to log onto the server locally through terminal services to see if I had the password correct. I was able to log in fine. Then, I ran to the local computer as if it was another one on the network. I was able to see the share and create a new file in it. One thing I did notice is that IIS isn't installed on the file server, would that cause any problems?? Thank you so much for all of your time!!!
 
No IIS not being installed on the file server should be no problem. The only thing you are doing is coping files over.

Ok...well lets try this again, but a little different, map a drive again on server a to server b as letter H or whatever letter is available and then create a dummy text file (note: Make sure the slashes are \ not /):

set fle = fso.CreateTextFile("h:\drawingdbfiles\test\test.txt")

Tell me what happens then.
 
Okay, now I get:

Execution ended: 2/10/2005 11:29:57 AM
Microsoft VBScript runtime error '800a004c'

Path not found

/drawingdb/upload.asp, line 172


If I run to the path that I have in the code on the web server, it comes right up without a problem.
 
ok...well I have been playing around with some code and I have a solution, unfortunately it has loop holes. Open IIS on the web server and right click on the web site and click on properties. Go to the Directory Security Tab and click on the edit button located under "Anonymous access...". Change the Anonymous Access user to a user who has write access to server b and run your code. (I changed it to our domain administrator and it worked). The problem here is that you will be using that user id when accessing your pages instead of iuser_machinename.

I hope this helps,
Patrick
 
I tried this with our domain admin account, but it still doesn't work. I think I might just have my manager get me another hard drive to put in this machine. This is so frustrating!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top