💻 Software
Passing PATH through sudo
Fresh5 days ago
Mar 15, 202619019 viewsConfidence Score0%
0%
Problem
In short: how to make sudo not to flush PATH everytime? I have some websites deployed on my server (Debian testing) written with Ruby on Rails. I use Mongrel+Nginx to host them, but there is one problem that comes when I need to restart Mongrel (e.g. after making some changes). All sites are checke…
Error Output
$ env | grep PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:/var/lib/gems/1.8/bin $ sudo cat /etc/sudoers | egrep -v '^$|^#' Defaults env_keep …
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Passing PATH through sudo
Low Risk
Struggled with the same problem for a few hours. In debian lenny, you can fix it by adding to the sudoers file. This is the only way to go around the compiled --secure-path option, (as far as I know). Notably, this will also exempt users from needin…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix