Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

up vote 2 down vote accepted
chattr +a filename

This makes the file append only.

OR

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

 
discard

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.