Jump to content

Write access for ASP.NET in website folder


joten

Recommended Posts

My ASP.NET code modifies XML files in a local folder. Everything works fine on my localhost. But at heliohost I get the following error: Access to the path "/home/bouwraad/public_html/Files/Tellers.xml" is denied.

 

Can this be solved? Can ASP.NET be given the right to modify files?

 

Thanks for the help

Link to comment
Share on other sites

That's happening because HelioHost disallows users to access other user's files. ASP.NET runs on its own user, and so it cannot access other files that aren't ASP.NET it seems.

 

I've made a small modification in your file's permissions: see if it works now.

Link to comment
Share on other sites

Accessing the file I specified works fine now. But I suppose you only changed the rights for that particular file. I have multiple files, all located at the "/home/bouwraad/public_html/Files"- directory. Is it possible to change the permission for that whole directory?

 

Thanks for the quick support!

Link to comment
Share on other sites

No problem. All the files should be working now.

 

Could it be that the added permissions are deleted again? It doesn't work anymore.

 

Thanks for the help!

 

EDIT: I just think of the fact that I recopied the files to the directory. Are the permissions on each file separately or on the directory 'files'? In the first case it could make sense that the permissions are gone due to the recopying. In that case, is it possible to grant ASP.NET write permission on everything that is located in the 'files' directory? Thanks

Link to comment
Share on other sites

So, when I want to add another file - to allow ASP.NET to modify - I will have to ask you again, if I understand it?

 

Can I change the content of a XML file offline without losing the permission? (So first copy the file to my local system, do some modifications and copy the file back online) If I keep working with the same file there will be no problem. Am I correct?

 

Thanks for the clarification

Link to comment
Share on other sites

No, you cannot overwrite the file. The permissions are applied directly to the file - if it is overwritten or deleted you will lose the permissions. However, you should be able to use cPanel's File Manager to edit your files.

 

And yes, you'll have to ask me for every file. Sorry :(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...