Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an XML file on my http server. I have full root access to the server (the server is running ubuntu). What I want to do is allow some users to append to the xml file. I am looking for a secure way to do this, so that the user can only append one line to the file in a specific format. What would be the best way to go about this? I am assuming I would have to give people guest access to do this but how will they gain write access to the file?

share|improve this question
up vote 2 down vote accepted
chattr +a filename

This makes the file append only.


You may also want to consider just writing a script which will take some input and append it to the file. That way you don't need to give everyone privileges to edit your file, just the script which runs at the level of the apache user. With a script you can also check the input to make sure it is valid.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.