Just how do I edit/modify a documents on a webserver making use of php documents in the very same area?

I have an XML documents on my server. In the very same directory I have a PHP documents which changes the web content of the XML and also waits. In this, the conserve component does not function. In my expertise the code is alright and also the trouble is with the documents accessibility persmissions.

Even more information readily available below: https://stackoverflow.com/questions/3351652/how-to-save-an-xml-file-on-the-web-server-using-php ( There is absolutely nothing incorrect with the code. I gave it to offer even more understandings. The trouble appears to be with the accessibility approvals )

The approvals of the XML documents is: rw-r-- r-- (644)

My inquiry is, am I doing it right? Just how do I change a documents in the very same directory?

2019-05-04 02:37:27
Source Share
Answers: 2

The solution will certainly transform relying on that possesses the civil liberties to that documents. As an example when I create a documents on our server with our FTP customer (filezilla) the proprietor is the username of our FTP account yet if we create the documents making use of PHP the proprietor is www - information.

That being claimed by considering your civil liberties I see that just the proprietor deserves to write on your documents, the team and also various other just have actually read accessibility. Below's a calculator I'll usually make use of to number which civil liberties to provide to the chmod command (http :// www.onlineconversion.com/html_chmod_calculator.htm). It's rather instinctive yet I'm presuming you'll need to offer write accessibility to the team.

Hope that aids :)

2019-05-08 11:45:10

Maybe I'm forgeting something, yet it feels like you just have actually offered write accessibility to the proprietor, which has actually currently been developed to be most likely something apart from your PHP/Webserver's customer, hence, no approval to write.

You can either see to it that your customer remains in the "www - information" team (or whichever team your webserver is making use of) and also add write approval to the team "chmod g+w filename.xml"

Or, you can position that documents in the "www - information" team with "chown www - information :www - information filename.xml"

2019-05-08 10:49:27