2022 Developer Survey is open! Take survey.

Questions tagged [environment-variables]

Environment variables are configuration options that can be set in a shell or other similar environments. All programs started from within the shell can read them and configure themselves.

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

PYTHONPATH with limited access directories and shared Anaconda installation

We have a shared Anaconda install on a Windows 2016 server where users have varied access rights. We set PYTHONPATH to point a network drive (P:/code) to enable the import of custom modules. When a ...
user avatar
0 votes
1 answer
50 views

Environment variables in systemd ExecStart, ExecStop clauses not working as expected

I'm working on some unit files for some systemd services. The path prefix to some of my binaries is quite long and they are used several times in ExecStart=, ExecStartPost=, and ExecStop= clauses. I ...
user avatar
0 votes
1 answer
30 views

Erased System Path Variables

I was writing a batch file that was supposed to automatically set up a computer to receive "psexec" remote commads. Unluckly i didn't really pay attention to what i was writing and i wrote ...
user avatar
  • 1
0 votes
0 answers
40 views

Different environment variables for different nginx configurations

I want to link up different linux environment variables to different nginx configurations. I have: react-app-1.conf - nginx config in sites-available directory, one of my react appplication. react-...
user avatar
1 vote
1 answer
97 views

Avoid pod environment variables' conflicts with Docker-style links

We running or components in Kubernetes with Docker as container runtime. A problem with it is that pod environment is polluted with Docker-style link variables like SERVICENAME_PORT_8181_TCP ...
user avatar
0 votes
1 answer
98 views

crontab: using ${USER}

I am writing some scripts that uses ${USER} to point to subsequent scripts. But when I run it from crontab, it errors out and the files are not found. I understand why. I intend to share this with my ...
user avatar
  • 101
0 votes
1 answer
302 views

Technically how do curl, ping and other tools get around an NGINX front facing reverse proxy server?

I'm having trouble understanding how communication occurs on a linux box if a front facing server like NGINX has been installed. For example this is my setup. AWS / EC2 linux based instance NGINX - ...
user avatar
0 votes
0 answers
361 views

http_proxy lists port of 3128 but when I netstat that port is not open. What does this indicate?

My proxy values suggest that localhost:3128 is being used as a proxy. I should add that I personally added these environmental variables in an .sh file in my profile.d folder. A tutorial indicated I ...
user avatar
0 votes
1 answer
94 views

On CentOS 8 in profile.d do I need to add my script related to environment variables to both an .sh and .csh file?

I need to add environmental variables related to proxy servers to allow my node.js app to communicate with reCAPTCHA Enterprise on Google Cloud. When I run the scripts from Accessing Google Cloud APIs ...
user avatar
0 votes
0 answers
65 views

no login/no home dir user gets permission for denied (redhat8)

I am trying to solve a problem At work there is a given task where a python application is currently running on a server, this application is using a env file, which has username and password ...
user avatar
-1 votes
1 answer
2k views

java.exe in "C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe" overridden local Java installation

Why and how come java.exe appeared in "C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe", on Windows 10, and even more surprisingly - overridden my OpenJDK's java.exe binary,...
user avatar
1 vote
2 answers
127 views

How do I make my PHP Source installation use the libraries inside of /usr/local/programname/lib instead or /usr/local/lib?

How do I make my PHP Source installation use the libraries inside of /usr/local/programname/lib instead or /usr/local/lib? I have tried setting LD_LIBRARY_PATH to each of the program names like ...
user avatar
0 votes
1 answer
1k views

Setting environment variable for a different user in windows

There are tons of examples on the web how to set an environment variable for the current user. Is it possible to set an environment variable in windows for a different user (that does not have login ...
user avatar
  • 167
0 votes
1 answer
1k views

Python throws KeyError when exporting environment variables

I have a weird case where i have a secret.env file where i set all my environment variables as such: secret.env export TWITTER_CONSUMER_KEY="something" export TWITTER_CONSUMER_SECRET="...
user avatar
1 vote
3 answers
1k views

Using ENV variables in Postfix and Dovecot configuration files

I'm trying to dockerize my mailing server and I'm having some troubles regarding how am I supposed to use environment variables inside Postfix and Dovecot configuration files (I'm using the latest ...
user avatar
  • 21
0 votes
2 answers
563 views

gammu 1.42, gammu-smsd service error, LD_LIBRARY_PATH not found

I'm trying install Gammu 1.42 to serve my SMS gateway on Centos 8. make, make test, make install works fine. LD_LIBRARY_PATH configured in /etc/profile as: ...... LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/...
user avatar
  • 101
0 votes
1 answer
297 views

NUMBER_OF_PROCESSORS env var incorrect on Dell PowerEdge Gen14 With Windows Server 2012 R2

I'm seeing that the environment variable NUMBER_OF_PROCESSORS is incorrect on my newly installed Dell PowerEdge 740xd Gen 14 running Windows Server 2012 R2 Standard. The machine contains 2 CPUs - ...
user avatar
  • 213
0 votes
0 answers
64 views

Process getting different environment variables to system settings

I have an issue where a tomcat process started through salt stack is getting different environment variables than the ones set on the system. This is on a centos 7 server. Below is the locale -v ...
user avatar
  • 101
1 vote
0 answers
1k views

Apache 2.4 environment variables in config

Ok, so I'm building a docker image for apache. I want to allow users to specify custom apache config with the environment variable. TL;DR The question could be simplified to this: how to use ...
user avatar
1 vote
0 answers
45 views

Environment variables inside of an environment file

Background I was deploying my docker environment to a production server when I've noticed that the application would not work. For some reason the environment variables were not set correctly inside ...
user avatar
  • 187
1 vote
1 answer
563 views

Can the Apache SetEnvIf Request_URI variable be decoded in Virtual Host and/or Server config context?

When the following SetEnvIf directive is in a virtual host directory section or in an .htaccess file the Request_URI variable is percent decoded. But when it is not in a directory section or .htaccess ...
user avatar
  • 191
0 votes
0 answers
56 views

How can I add a library search path to an executable running with a capability?

I have an application that needs to run with the CAP_NET_BIND_SERVICE capability so that it can open a low port (502 for a TCP/Modbus server). It comes bundled with a set of .so files that it needs to ...
user avatar
0 votes
2 answers
180 views

How to set a tmp env variable from inside a bash script

I have a simple bash script: #!/bin/bash export MONGOMS_DOWNLOAD_URL="https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.2.8.tgz" export MONGOMS_VERSION="4.2.8" ...
user avatar
  • 877
0 votes
1 answer
39 views

How do I set enviromental varialbes for my ubuntu server?

I have a ubuntu server deployed at digitalocean with gunicorn and nginx to host my django project. Now I want to save my secret key in an env. var. . I searched in the internet and I found that I have ...
user avatar
  • 115
2 votes
1 answer
2k views

Using IfDefine with environment variables

I am trying to make my configuration as flexible and easy-to-configure as possible by using a list of variables in /etc/sysconfig and loading the environment variables when Apache is started using a ...
user avatar
  • 173
-1 votes
1 answer
361 views

How can I fix the error Undefined variable: _ENV in /home/nginx/domains/mydomain.com/system/Config/BaseConfig.php?

I am trying to install a Codeigniter application in pure NGINX + PHP-FPM environment but it was previously developed in apache . After adding all the proper rules to Nginx in order to work with ...
user avatar
0 votes
1 answer
4k views

How to interpolate Jenkins environment variables inside Dockerfile?

I have a Jenkins pipeline, One of the stages of the pipeline is to build the artifact from a java application code. The artifact always get the name hello-world-${BUILD_ID}.war using BUILD_ID jenkins ...
user avatar
1 vote
1 answer
265 views

linux capabilities to read environment variables?

I'd like to run a service as a non-privileged user, but it needs to bind to a system port number (i.e. less than 1024), so I give it setcap 'cap_net_bind_service=+ep' <path for service>, all ...
user avatar
1 vote
0 answers
78 views

How to auto init direnv on Google Cloud Shell?

my .bashrc has these lines at the bottom: if [ -f $HOME/tools/bashrc ]; then source $HOME/tools/bashrc fi and $HOME/tools/bashrc has this code at the bottom: eval "$(pyenv init -)" pyenv ...
user avatar
  • 111
0 votes
2 answers
768 views

Where to Unset or change $_SERVER['LD_LIBRARY_PATH']?

I have an Apache 2.4 proxying to PHP7.4.4 php-fpm and I am trying to hide or unset the $_SERVER['LD_LIBRARY_PATH'] variable. How do I change or get rid of this variable $_SERVER['LD_LIBRARY_PATH'] in ...
user avatar
0 votes
1 answer
214 views

Are /etc/profile.d scripts always executed on server boot?

I have a GCP instance with Ubuntu 18.04, and I'm using GCP secret manager to pull down secrets at boot time with a script in /etc/profile.d, that way I can setup system-wide environment variables that ...
user avatar
0 votes
1 answer
105 views

Where is $TERM set in Linux

Specifically Ubuntu 16.04 but is there a general way it is set? The reason I ask is that I have several Ubuntu 16.04 installations (VMs on kvm/libvirt/qemu) where nothing specific was done to set ...
user avatar
1 vote
0 answers
450 views

Need to Pass Environment Variables Through Apache Proxy

BACKEND: I have Tomcat connected to Apache and JKMount'ed to webapps.demo.example.com. FRONTEND: The primary VirtualHost is setup for demo.example.com. I have one application Proxy'd to BACKEND. ...
user avatar
  • 169
0 votes
1 answer
1k views

Grafana - Config overridden from Environment variable

I'm trying to follow Configure with environment variables / root_url # grep GF_ROOT_URL docker-compose.override.yml - GF_ROOT_URL=https://g.x.com/ # yet, when I invite ...
user avatar
  • 12.2k
0 votes
1 answer
103 views

Environment variables within docker images

My goal is to use environment variables in the docker-compose.yml file that can be referenced inside the application itself like in config/database.yml docker-compose.yml ... environment: $DB_NAME:...
user avatar
  • 984
1 vote
1 answer
888 views

Within FreeBSD jail – setting global environment vars

I need to set a systemwide environment variable (i.e. NODE_ENV=production) in a FreeBSD jail. I did try setting it in /etc/profile, but when I sourced it root@www:/ # source /etc/profile I got ...
user avatar
  • 135
0 votes
1 answer
347 views

Passing environment variables to httpd in centos 7

In my previous Centos 6.10 server , I have been able to pass some environment variables to httpd by adding to /etc/sysconfig/httpd . ~/.envvars .envvars content is export MY_PASSWORD='somepassword'...
user avatar
0 votes
1 answer
4k views

How to make changes to environmental variables on Windows Server 2016 stick and stay permanent?

After setting the CLASSPATH environmental variable on Windows Server 2016 using the Control Panel/System/Advanced Settings/Environmental Variables UI Tool - the CLASSPATH value reverts back to its ...
user avatar
0 votes
1 answer
119 views

GitLab: Global (instance-level) variables for CI builds

How can I set up global environment variables in GitLab that are not project-specific, but apply to all projects? Classic use cases are deployment keys, docker registry credentials and connect proxy ...
user avatar
  • 494
9 votes
1 answer
2k views

SSH: Behavior of SetEnv for TERM variable

I want to set the TERM environment variable to a different value for each of my remote machines, so i used SetEnv TERM=myTermForRemoteVar in ~/.ssh/config. The remote machine still sees TERM=...
user avatar
0 votes
2 answers
978 views

Unable to export service account key in Terraform #GCP

I have downloaded the GCP service account key to my local system. In Terraform, I have set the GOOGLE_APPLICATION_CREDENTIALS as a path to this file in the startup-script part of my bastion instance. ...
user avatar
0 votes
1 answer
1k views

How to set the "ASPNETCORE_ENVIRONMENT" environmentVariable in the WEBROOT (web.config) with APPCMD.exe?

How am I able to set the sites web.config "ASPNETCORE_ENVIRONMENT" environmentVariable with APPCMD.exe? So far I've tried ending it using /commit:MACHINE/WEBROOT, /commit:webroot and I get the below: ...
user avatar
1 vote
0 answers
204 views

Permanently load environment variable on aws ssm login in windows PowerShell

I am using ssm login for logging into my windows server 2016 data center edition. When I make a RDP connection and run PowerShell from RDP, All the system environment variables are loded correctly ...
user avatar
0 votes
1 answer
1k views

How to increase the Java Memory in Windows Server 2016 R2?

I am trying to follow This Link to increase the memory that is available to the Java Runtime Environment, becase I encountered the "insurfficient memory for the Java Runtime Environment to continue" ...
user avatar
1 vote
1 answer
1k views

Can multiple nginx statements be on the same line in a config file?

The Problem I'm creating a docker image which dynamically creates nginx config based on environment variables. I would like to minimise the number of environment variables required. I have a config ...
user avatar
1 vote
1 answer
198 views

How can I make an environment variable visible to a script placed in /etc/cron.daily?

Say I have a script named "mydailyscript" containing the following: #!/bin/bash if [ ! -z $MYDAILYLOG]; then exec 1>$MYDAILYLOG fi echo This script ran on $(date) and I then copy this script to /...
user avatar
  • 35
2 votes
1 answer
8k views

Setting Apache Tomcat JRE_HOME without setting environment variable

I have a server which uses Java 6 for an Oracle implementation. But I want to install a Tomcat Apache Server on it but with Java 8. So in order to not mix the system environment here's what I want to ...
user avatar
  • 23
0 votes
1 answer
7k views

Pass variable in remote SSH-command in Jenkins-job

i have a little test job: touch 22.txt echo "wwe" > 22.txt test=$(echo ${BUILD_NUMBER}) echo $test ssh jenkins@srv1 "mkdir D:\myfolder\$test" ssh jenkins@srv1 "dir D:\myfolder\" BUILD_NUMBER ...
user avatar
  • 501
-2 votes
3 answers
56 views

See someone unused environment variable [closed]

Let's say I log in as Bob to host server. Then i do : export MYSEC='secret' Let's say Alice has access to the same host and also sudo permissions. How can Alice see the value of MYSEC? Note : let'...
user avatar
1 vote
1 answer
33 views

Task under SYSTEM won't run Win Srv 2k8R2

My company has a software that updates our installers on clients' servers. During the setup, a environment variable is created along with a task with the following lines: Variable: setx ccloud "C:\...
user avatar

1
2 3 4 5
8