I am running Tor via a PHP exec() and therefore its instance and data directory will be owned by 'www-data'. Is this OK to do or is there a better way I should be doing this?

1 Answer 1


Supposing you're hosting other sites under the www-data user, it is not a very safe configuration. I'd suggest you deploy the PHP site via FastCGI so that it runs under a dedicated user account. You can also consider using sudo to launch the external command under different user (you'll need to configure /etc/sudoers with NOPASSWD switch for this particular command).

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.