Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

What is the best workflow for working on PHP Webpages (local) in "Ubuntu Desktop". My problem is, when i logIn with my Ubuntu Account, and when i open a php file "geany" i cannot save the file any more, because the file is owned by "www-data". Is there a way to open "www-data" owned files -> edit it -> and save them again as www-data?

What is your workflow?

share|improve this question

I use sudo to support this kind of workflow. It will allow you to execute commands as the user www-data. As an example, if you use vi as your text editor, you would use a command like this:

sudo -u www-data vi index.php

In order to give yourself permission to use sudo as the user www-data, you'll need to add the following to /etc/sudoers:

yourusername ALL=(www-data) ALL
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.