EEuser 357778
asked on
linux, command not found? simple?
Im running fedora core 10.
when i test:
sudo -u nobody ffmpeg [options]
i get: sudo: ffmpeg: command not found
but if i do:
sudo -u nobody /ffmpeg/ffmpeg [options]
then it works
how do i get ffmpeg into the right place so that the first command will work>
thanks alot!
joe
when i test:
sudo -u nobody ffmpeg [options]
i get: sudo: ffmpeg: command not found
but if i do:
sudo -u nobody /ffmpeg/ffmpeg [options]
then it works
how do i get ffmpeg into the right place so that the first command will work>
thanks alot!
joe
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
just add this line to your ".bash_profile"
PATH="${PATH}":/ffmpeg
then run this command from the terminal windows
$ source ~/.bash_profile
you don't have to include these lines in your .bash_profile
source the .bash_profile
$ source ~/.bash_profile
PATH="${PATH}":/ffmpeg
then run this command from the terminal windows
$ source ~/.bash_profile
you don't have to include these lines in your .bash_profile
source the .bash_profile
$ source ~/.bash_profile
your .bash_profile should look like this
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
PATH="${PATH}":/ffmpeg
export PATH
unset USERNAME
to disable iptables firewall execute these commands
service iptables save
service iptables stop
chkconfig iptables off
service iptables save
service iptables stop
chkconfig iptables off
ASKER
still same thing...
does seomthing need to be reset after i change this??
understand that typing int
ffmpeg works.
ist just when i do sudo -u apache ffmpeg...
or
sudo -u nobody ffmpeg....
or
sudo -u root ffmpeg
does seomthing need to be reset after i change this??
understand that typing int
ffmpeg works.
ist just when i do sudo -u apache ffmpeg...
or
sudo -u nobody ffmpeg....
or
sudo -u root ffmpeg
When you do 'sudo -u nobody <command>', the PATH is being picked up by the '-u nobody' profile, not your own profile. The best way around this would be to modify the global profile (usually found under /etc/profile).
_OR_
If this is being kicked off from your account, do:
PATH=$PATH:/path/to/comman d
sudo -u userid command
_OR_
If this is being kicked off from your account, do:
PATH=$PATH:/path/to/comman
sudo -u userid command
sudo -u nobody ffmpeg....
you also need to add "/ffmpeg/" directory to the PATH of the user nobody
or add the "/ffmpeg" to the the "system wide /etc/profile"
you also need to add "/ffmpeg/" directory to the PATH of the user nobody
or add the "/ffmpeg" to the the "system wide /etc/profile"
or you can just create a soft link to that command in /usr/bin with that command as root:
ln -s /ffmpeg/ffmpeg /usr/bin/ffmpeg
nothing else needed.
ln -s /ffmpeg/ffmpeg /usr/bin/ffmpeg
nothing else needed.
Hello
Type at prompt:
whereis ffmpeg
<must see the result>
PATH=$PATH:/pathoftheffmpe g
sudo -u <username> ffmpeg
Great is our GOD.
:)
rionroc
Type at prompt:
whereis ffmpeg
<must see the result>
PATH=$PATH:/pathoftheffmpe
sudo -u <username> ffmpeg
Great is our GOD.
:)
rionroc
Unless configured to leave all environment symbols as is, sudo sanitises the environment
by cleaning it out and establishing the system defaults.
SO interactive PATH=$PATH ... won't work.
the symlink (to add an alias to /bin or better /usr/bin ) suggestion does work, the modification of your default environment should work (/etc/profile).
Also giving an explicit location to sudo should work...
sudo -u nobody /ffmpeg/ffmpeg ..... ;-)
Also why this location /ffmpeg/ffmpeg..., if you install an rpm it should be setup to all the right places.
by cleaning it out and establishing the system defaults.
SO interactive PATH=$PATH ... won't work.
the symlink (to add an alias to /bin or better /usr/bin ) suggestion does work, the modification of your default environment should work (/etc/profile).
Also giving an explicit location to sudo should work...
sudo -u nobody /ffmpeg/ffmpeg ..... ;-)
Also why this location /ffmpeg/ffmpeg..., if you install an rpm it should be setup to all the right places.
I guess you should run the following before running the command:
export PATH=$PATH:/ffmpeg
And if you don't want to run this every time, then you can add this into you profile.
export PATH=$PATH:/ffmpeg
And if you don't want to run this every time, then you can add this into you profile.
ASKER
did that
samething...
[root@fightube ~]# sudo -u nobody ffmpeg -i /var/www/html/wsngallery/a
sudo: ffmpeg: command not found
do i need to restart something after making that change?
also how do i disable iptables servcie on boot
Open in new window