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?


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
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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