Link to home
Start Free TrialLog in
Avatar of alex_wareing
alex_wareing

asked on

Upload form in ASP

Ok i'm trying to get SA Fileup working for uploading files to my server, here is the error messgae i keep getting:

SoftArtisans.SAFile.1 error '80070005'

Error occurred when moving cached file to final destination. Please check the NTFS permissions for the directory "e:\somepath\docs\" and the directory containing the file "e:\someOtherPath\docs\newinvoice.pdf". These directories require Read, Write and Delete permissions by the anonymous user ( NT account: IUSR_computername ) and/or by your authenticated users.Access is denied.

/clientlink/admin/formresp.asp, line 10

My code is (you can try the page for yourself here: http://www.aiwmedia.com/clientlink/admin/form.asp)

<%@ LANGUAGE="VBSCRIPT" %>
<HTML>
<HEAD>
<TITLE>Upload File Results</TITLE>
</HEAD>
<BODY>
Thank you for uploading your file.<br>
<% Set upl = Server.CreateObject("SoftArtisans.FileUp") %>
<% upl.Path = "e:\kunden\homepages\29\d90486262\aiwmedia\clientlink\docs\" %>
<% upl.Save %><BR>
Total Bytes Written: <%=upl.TotalBytes%>
</BODY>
</HTML>

i have given read/write/execute permissions to the docs folder and for all files within to the IUSR. what can i do?
Avatar of fritz_the_blank
fritz_the_blank
Flag of United States of America image

Are you certain that you have given the IUSR_  READ/WRITE/DELETE permissions to both directiories? Sometimes a reboot is necessary on NT before this really works.

FtB
Avatar of alex_wareing
alex_wareing

ASKER

i have shared hosting and i have set the preference, but i can't reboot the server!
If you have shared hosting, I suspect that you may not be able to set those permissions. Any chance of running this by the server administrator?

FtB
i have shared hosting with oneandone.co.uk. The permissions can be set, and work when i do them for databases. When i use this code:

<%
Set objFile = Server.CreateObject("SoftArtisans.SAFile")
objFile.Path = "e:\somePath\docs\"
objFile.Create "oraMutantur.txt"
%>

it writes the file ok

ASKER CERTIFIED SOLUTION
Avatar of fritz_the_blank
fritz_the_blank
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
BTW, I get the same error message here.

FtB
Is this the same thing as theother thread, because you have not responded there:

https://www.experts-exchange.com/questions/21215104/Uploading-files-and-adding-filename-to-db.html

For 1and1 you need to use the 1and1 control panel to give access to the IUSR.  You login to 1and1 -> Administration -> Applications -> WebFiles

Then setup the security for the folder you want to upload to.
No these are 2 seperate questions, the other question is how to go about it.

I have done exactly as you show and use WebFiles to set the permissions, and yet i still get this error message? which is why i thought it may be a code issue
PS, probably not the best idea to display the full paths in your errors....that is account specific information for you, and not that safe out here on the web!
>>No these are 2 seperate questions, the other question is how to go about it.

So is the other question answered or do you need more help there?

>>which is why i thought it may be a code issue

Not a code issue...
The error message clearly points to a permissions issue. I realize that you have set READ and WRITE, but the error message indicates that DELETE is necessary as well.

FtB
>>Error occurred when moving cached file to final destination

I don't think this is delete error?  Is it?
>>I am going to edit out the full paths in the threads for security purposes.

Thanks.
Yes--it could be as the delete is part of the move.

FtB
FtB i realise the security issue with posting paths, please could you edit the path in the code block in the orginal question as well thanks
Well i finally got through to oneandone support and they told me that the problem was with the delete permission. Apparently i had set it using the managment app but the changes hadn't been made on the server itself for some reason??? anyway its been done manually for me. was driving me nuts for a while then. thanks guys
Glad to have helped,

FtB