3 Fix typo and minor formatting changes for readability
source | link

Don't give that user root access as pointed out by MatMat.

Instead, give them write permission to the relevant directory hierarchy.

Use psps as dr01dr01 mentioned to find the user. If the webserver runs in a multi-user environment with php wrappers, that won't necessarily be the same user under which Wordpress runs, though. In such cases you could run a script in the webserver like

<?php passthru('whoami'); ?>

to print the username, or if the server can't run commands, something like:

<?php file_put_contents('/tmp/test', 'dummy'); ?>

Willwill create a /tmp/test file under with relevant owner (just do a ls -l /tmp/test).

Don't give that user root access as pointed out by Mat.

Instead, give them write permission to the relevant directory hierarchy.

Use ps as dr01 mentioned to find the user. If the webserver runs in a multi-user environment with php wrappers, that won't necessarily be the same user under which Wordpress runs, though. In such cases you could run a script in the webserver like

<?php passthru('whoami'); ?>

to print the username, or if the server can't run commands, something like:

<?php file_put_contents('/tmp/test', 'dummy'); ?>

Will create a /tmp/test file under with relevant owner (just do a ls -l /tmp/test).

Don't give that user root access as pointed out by Mat.

Instead, give them write permission to the relevant directory hierarchy.

Use ps as dr01 mentioned to find the user. If the webserver runs in a multi-user environment with php wrappers, that won't necessarily be the same user under which Wordpress runs, though. In such cases you could run a script in the webserver like

<?php passthru('whoami'); ?>

to print the username, or if the server can't run commands, something like:

<?php file_put_contents('/tmp/test', 'dummy'); ?>

will create a /tmp/test file with relevant owner (just do a ls -l /tmp/test).

2 Added alternative
source | link

Don't give that user root access as pointed out by Mat.

Instead, give them write permission to the relevant directory hierarchy.

Use ps as dr01 mentioned to find the user. If the webserver runs in a multi-user environment with php wrappers and such, that won't give you a good enough answernecessarily be the same user under which Wordpress runs, though. In such cases you could run a script in the webserver like

<?php passthru('whoami'); ?>

to print the username, or if the server can't run commands, something like:

<?php file_put_contents('/tmp/test', 'dummy'); ?>

Will create a /tmp/test file under with relevant owner (just do a ls -l /tmp/test).

Don't give that user root access as pointed out by Mat.

Instead, give them write permission to the relevant directory hierarchy.

Use ps as dr01 mentioned to find the user. If the webserver runs in a multi-user environment with wrappers and such, that won't give you a good enough answer. In such cases you could run a script in the webserver like

<?php passthru('whoami'); ?>

to print the username.

Don't give that user root access as pointed out by Mat.

Instead, give them write permission to the relevant directory hierarchy.

Use ps as dr01 mentioned to find the user. If the webserver runs in a multi-user environment with php wrappers, that won't necessarily be the same user under which Wordpress runs, though. In such cases you could run a script in the webserver like

<?php passthru('whoami'); ?>

to print the username, or if the server can't run commands, something like:

<?php file_put_contents('/tmp/test', 'dummy'); ?>

Will create a /tmp/test file under with relevant owner (just do a ls -l /tmp/test).

1
source | link

Don't give that user root access as pointed out by Mat.

Instead, give them write permission to the relevant directory hierarchy.

Use ps as dr01 mentioned to find the user. If the webserver runs in a multi-user environment with wrappers and such, that won't give you a good enough answer. In such cases you could run a script in the webserver like

<?php passthru('whoami'); ?>

to print the username.