Excerpt |
---|
|
Application processes in root360 environments are run as the Unix-user www-data . Likewise, all application files (such as the files in your apache or nginx document roots) are owned by www-data . |
Application processes in root360 environments are run as the Unix-user www-data
. Likewise, all application files (such as the files in your apache or nginx document roots) are owned by www-data
.
To run a command as this user, use
sudo -u www-data command
As an example: to list the currently installed cronjobs on an application instance, you can use
sudo -u www-data crontab -l
Here is a more interesting example, an rsync command that copies data from <local-source-path>
to /mnt/nfs/<destination>
on a root360 natgw so that the resulting files are owned by www-data
instead of your project user <project-user>
:
rsync --rsync-path 'sudo -n -u www-data rsync' <additional-rsync-options> <local-source-path> <project-user>@<natgw-ip-destination>:/mnt/nfs/<destination>
$home of www-data
www-data does not have its own home directory. When you call commands with sudo -u www-data
, you inherit $HOME
from the calling user. In some cases you may want to manually set $HOME:
Code Block |
---|
project-user $ HOME=/tmp/home; sudo -u www-data echo $HOME
/tmp/home |
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 10 |
---|
showSpace | false |
---|
cql | label in ( "ssh" , "application" , "ec2" ) and space = currentSpace ( ) and ancestor = "2014352487" |
---|
|
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 10 |
---|
showSpace | false |
---|
cql | label in ( "ssh" , "application" , "ec2" ) and space = currentSpace ( ) and ancestor = "2014350220" |
---|
|