bash profile works for user but not sudo
Posted
by
user564448
on Ask Ubuntu
See other posts from Ask Ubuntu
or by user564448
Published on 2012-11-09T16:48:09Z
Indexed on
2012/11/09
17:20 UTC
Read the original article
Hit count: 366
bash
I've modified my .profile to include a folder if a flash drive is plugged in. When running the command as the user it works fine but tells me the scrip must be run by sudo (this is what i want). However, when i try to run it with sudo i get "command not found"
I have a symlink (flash) in my /var/www folder pointing to my /media/flash drive. (nevermind this setup since is just for dev)
this is my user's .profile :
# set PATH so it includes flash scripts
if [ -d "/var/www/flash/scripts" ] ; then
PATH="/var/www/flash/scripts:$PATH"
fi
when trying to run as sudo i get:
sudo: script: command not found
any ideas?
© Ask Ubuntu or respective owner