I've set up a VPS server on Digitalocean. Installed Ubuntu 18.04, LAMP, etc. Finally, I installed ffmpeg. It is working fine from terminal but when I try to execute it through php it gives a weird "Permission denied" error:
Here is some information:
root@vl:/# whereis ffmpeg
ffmpeg: /usr/local/bin/ffmpeg
root@vl:/# whereis ffprobe
ffprobe: /usr/local/bin/ffprobe
root@vl:/# ffmpeg -version
ffmpeg version N-102461-g8649f5dca6 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr/local/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/usr/local/ffmpeg_build/include --extra-ldflags=-L/usr/local/ffmpeg_build/lib --extra-libs='-lpthread -lm' --ld=g++ --bindir=/usr/local/bin --enable-gpl --enable-gnutls --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libsvtav1 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 57. 0.100 / 57. 0.100
libavcodec 59. 1.100 / 59. 1.100
libavformat 59. 0.101 / 59. 0.101
libavdevice 59. 0.100 / 59. 0.100
libavfilter 8. 0.101 / 8. 0.101
libswscale 6. 0.100 / 6. 0.100
libswresample 4. 0.100 / 4. 0.100
libpostproc 56. 0.100 / 56. 0.100
My php file:
?>
The ERROR!:
ffmpeg version N-102461-g8649f5dca6 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr/local/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/usr/local/ffmpeg_build/include --extra-ldflags=-L/usr/local/ffmpeg_build/lib --extra-libs='-lpthread -lm' --ld=g++ --bindir=/usr/local/bin --enable-gpl --enable-gnutls --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libsvtav1 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree libavutil 57. 0.100 / 57. 0.100 libavcodec 59. 1.100 / 59. 1.100 libavformat 59. 0.101 / 59. 0.101 libavdevice 59. 0.100 / 59. 0.100 libavfilter 8. 0.101 / 8. 0.101 libswscale 6. 0.100 / 6. 0.100 libswresample 4. 0.100 / 4. 0.100 libpostproc 56. 0.100 / 56. 0.100 Input #0, gif, from 'mj.gif': Duration: 00:00:01.60, start: 0.000000, bitrate: 22863 kb/s Stream #0:0: Video: gif, bgra, 1400x1050, 10 fps, 10 tbr, 100 tbn output.mp4: Permission denied
From the past 24 hours I've tried installing ffmpeg in different ways (compiling & apt install), I've also tried changing the permission but still I'm stuck with this error.
Any help would be highly appreciated!
Thanks