I have some flv files and I'm trying to play them in VLC. I keep them in a separate directory owned by root (both directory and the files) to prevent accidentally deletion.
Now the interesting part:
If the file is owned by root, VLC claims cannot open the flv file and stops.
If the file is owned as regular user VLC is playing the file just fine.
The VLC is ran as regular user, just the file is owned by root.
Here's the VLC error: "Your input can't be opened: VLC is unable to open the MRL 'file:///path/test.flv"
And the VLC' log:
main debug: using default timeshift path main debug: `file:///test.flv' gives access `file' demux `any' path `path/test.flv' main debug: creating demux: access='file' demux='any' location='path/test.flv' file='path/test.flv' main debug: looking for access_demux module matching "file": 21 candidates main debug: no access_demux modules matched main debug: creating access: file:///path/test.flv main debug: (path: path/test.flv) main debug: looking for access module matching "file": 26 candidates filesystem error: cannot open file path/test.flv (Permission denied) main debug: no access modules matched
All the systems, both 16.04 and 18.04 are up to date and all packages are taken from official Ubuntu repos.
Any ideas how to fix this? Thanks!
Edit1: The dir/file permissions are fine:
drwxr-xr-x 2 root root 4096 dec 23 2015 Directory/ -rw-r--r-- 1 root root 12583957 apr 6 2012 test.flv –
What is really strange is that other files in the same dir and with the same permissions BUT *.mpg and *.avi are played fine.
Edit2: Found a solution.
It seems the problem is (on 16.04) the VLC provided by snap (the one I had installed). After removing and installing VLC media player with Ubuntu Software Center (version 2.2.2) now I don't see the issue anymore. Yet the problem with the snap version still remains.
Edit3: The same on 18.04. Removed the snap version, installed the deb version, now everything is OK.