Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

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.