Jump to content

Write access for ASP.NET in website folder


Recommended Posts

Posted

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

Posted

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.

Posted

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!

Posted
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

Posted

Sorry... that's not possible. You'll have to manually request every permission change.

OK, I have modified your settings - everything should be working again.

Posted

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

Posted

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 :(

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...