FFMpeg permission denied error
Solution 1
I've spend weeks to remove some conflicts of libraries and ffmpeg got installed. But unfortunately I installed it in /root/bin/
.
Typing this in the terminal fixed it for me:
cp -r /root/ffmpeg_build
cp -r /root/bin/{ffmpeg,ffplay,ffserver,x264,yasm} /usr/local/bin/
And it's working fine.
Solution 2
You can't use a link whose target is in a directory you don't have access to. The effective permissions on a link are those of its target.
I have no idea why you decided to install in /root/bin
, that is not what the guide you followed tells you to do. You should have installed everything in $HOME/bin
, your $HOME
. I am guessing that you followed all the steps from the guide but running everything from a root shell (sudo -i
or sudo su
or su
). If so, you should be able to get everything to work as expected if you just copy the directories created to your $HOME
:
sudo cp -r /root/ffmpeg_build ~/
sudo cp /root/bin/* ~/bin
The last command will copy everything from /root/bin
to ~/bin
which might not be what you want. If for whatever reason you have other files in there, just pick up the ones you created for ffmpeg
:
sudo cp /root/bin/{ffmpeg,ffplay,ffserver,x264,yasm} ~/bin/
Anyway, once all files have been copied, you can create the link in /usr/local/bin
for non-admin users. Even better, you can just move the directories above to /usr/local
and the binaries directly to ~/usr/local/bin
. However, note that they will be overwritten if you ever install ffmpeg
from the repositories using sudo apt-get install ffmpeg
.
Related videos on Youtube
Trev
Updated on September 18, 2022Comments
-
Trev over 1 year
I installed ffmpeg into /root/bin
I followed this guide: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
I now want a non admin to access it. I created a symbolic link in /usr/local/bin
now if i try to execute i get:
-bash: /usr/local/bin/ffmpeg: Permission denied