0

I need to add /var/www/owncloud to my www-data PATH variable. I can do this manually no problem. But trying to follow this solution to append e.g. PATH=$PATH:/var/www/owncloud to /etc/apache2/envvars - has no effect after service restart. Have tried with/without export prefix.

Any pointers? I'm running Raspbian Jessie.

geotheory
  • 173
  • 8
  • I tried the [solution you linked to](http://serverfault.com/questions/418952/setting-path-for-weberver-user/419072#419072) and it worked for me. How were you setting `$PATH` manually? – the_velour_fog Dec 12 '16 at 03:17
  • Using the example above: `PATH=$PATH:/var/www/owncloud` – geotheory Dec 12 '16 at 18:19
  • Is PATH being exported? if not it will only be available to `apachectl` (and `envvars`) – Unbeliever Dec 15 '16 at 11:35
  • @Unbeliever Thanks. I'm not sure. I think that's my question! – geotheory Dec 15 '16 at 23:08
  • Well if you followed the solution you linked, it talks about adding the path you need to the PATH environment variable. If you need this available to the apache httpd process itself, then it also needs to be exported in the `envvars` script. – Unbeliever Dec 16 '16 at 07:12
  • @Unbeliever sorry isn't that exactly what I've already tried, as I mention in the question? – geotheory Dec 16 '16 at 09:23
  • Yes. Without export its only available to the shell process itself. If it is exported it is available to any child processes. You'll need to explain under what circumstances it is not available. Note: if you do do an apache restart (as opposed to a stop/start), the environment variable will **NOT** change for the apache processes. – Unbeliever Dec 16 '16 at 10:42

0 Answers0