Logining into wwwdata
location: ubuntuforums.com - date: May 31, 2015
THIS IS POTENTIALLY INSECURE
SHOULD NOT BE DONE IN MOST CIRCUMSTANCES
In this how-to I will provide a one-time version and a shorter over time version. For the latter one, I assume you know how to use chmod.
# su -s /bin/bash www-data
Congrats, you're now logged in as www-data!
Create 2 files & make them executable:
Contents of /usr/sbin/to-www:
su -s /bin/bash www-data
Contents of /usr/bin/auto-www:
su -s '/usr/sbin/to-www'
To log in as www-data from a regular user, just run 'auto-www' and input the root password. For a sudoer, you can run 'sudo to-www' or 'auto-www'
But why would you want that?
For me it was the fact that I host multiple sites and they are managed by the perspective people and some scripts refuse to work with ownership of user:www-data * cough cough drupal cough cough * thus not allowing one user per site. However I did not wan
Page: 1 2 3 4 5 6 7 8 9 10