Try to capture RTSP stream with ffmpeg. Everything goes nice, if I save video to my home folder. Can't save to another directory. ffmpeg says 'Permission denied' even directory premission is 777.
In short:

ffmpeg  -i 'rtsp://' -c:v copy -an new.mp4


ffmpeg  -i 'rtsp://' -c:v copy -an folder777/new.mp4

Ubuntu Server 18.04.02. ffmpeg snap package v.4.1.
Any suggestion?

  • 2
    Which folder are you trying to save to? There are other reasons than file permissions for getting "permission denied". Commented Feb 14, 2019 at 13:48
  • No matter which folder is. I've tried different folders and diffrrent styles (short: folder/new.mp4; full: /home/user/folder/new.mp4) It can write to home folder (/home/user/) only. What reasons are you talking about? I'd like to listen it. Commented Feb 16, 2019 at 23:53
  • 2
    You've missed my point. There are certain things like fusermount that can cause "permission denied" even when file permissions allow. The fact this is a snap package already makes me suspicious this is a mounting issue. Please add an example of where you are trying. Also copy the exact message from the command line. "Permission denied" is rarely printed on a line on its own. If you are doing anything to change user at your terminal, beyond your regular login please state that also. Commented Feb 17, 2019 at 9:38
  • 1
    You're right, Philip. It's a mounting issue. I've tried to change folder which is located at the same drive as home folder. And it works. I've used defaults in fstab mounting (ext4). Still finding solution by trying different mount options, but your help is very valuable. Thx a lot. Commented Feb 18, 2019 at 9:29
  • 1
    SOLVED! Have to "snap connect" interface removable-media. Commented Feb 18, 2019 at 12:01

1 Answer 1


The thing is I've tried to save video to the folders located at mounted partition. And my snap package have no connection to interface "removable-media". After connection everything works great.

  • So is this a command or what?! Having the same issue and have no idea how to solve it.
    – Pithikos
    Commented Apr 16, 2020 at 8:46
  • sudo snap connect ffmpeg:removable-media - unix.stackexchange.com/a/580420/15200
    – arieltools
    Commented Jun 26, 2021 at 23:06
  • with this command I get error: cannot resolve connection, slot snap name is empty Commented Nov 10, 2021 at 15:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .