I'm trying to add /usr/local/texlive/2012/bin/x86_64-linux
to the PATH
environment for my Apache user (www-data
) after installing TeX Live 2012 manually.
I edited my /etc/environment
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/texlive/2012/bin/x86_64-linux"
to include this path within my system-wide PATH
environment variable for all users.
However, if I execute sudo -u www-data printenv PATH
I'm only getting:
# sudo -u www-data printenv PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
I can't understand the source of this issue and appreciate any help.
/etc/init.d/apache2
has the following:This overrides anything in
– George Feb 03 '14 at 14:00/etc/environment
and suggests that/etc/apache2/envvars
is the best place to add/edit vars required globally for apache. You can set environment vars locally within aVirtualHost
config usingSetEnv
.LANG
andPATH
that are set in this way, so any other vars added to/etc/environment
are included just fine. – George Feb 03 '14 at 14:01export PATH=$PATH:/var/www/owncloud
(which works manually aswww-data
) but it has no effect after service restart. Also tried with outexport
.. – geotheory Dec 12 '16 at 01:12