View Full Version : VLC unable to play read only files

3rd August 2012, 10:55 AM
I have recently set up a partition which is read only to normal users. I tried to play a video from here using VLC (which I normally use) but it won't play. It gives the following error:

File reading failed:
VLC could not open the file "/run/media/user/STORAGE/Storage/video.avi". (Permission denied)
Your input can't be opened:
VLC is unable to open the MRL 'file:///run/media/user/STORAGE/Storage/video.avi'. Check the log for details.

I have no idea where the log file is. When I tried to create a new log file through preferences the file is empty even after I try to run a video file.

I tried running vlc from the console and got this:

[0x7fc72c012678] filesystem access error: cannot open file /run/media/user/STORAGE/Storage/video.avi (Permission denied)
[0x7fc74c000b78] main input error: open of `file:///run/media/user/STORAGE/Storage/video.avi' failed

Seeing as the normal user has read permissions why does VLC complain about not having permission to access the file. What sort of permissions do I need to give to have VLC play things?

3rd August 2012, 11:01 AM
Edit /etc/fstab and create a mount point in /mnt instead as /media is for temporary mounts (they are destroyed on reboot) only.

Gareth Jones
3rd August 2012, 01:38 PM
Post the output of "mount | grep STORAGE" and "ls -l /run/media/user/STORAGE/Storage/video.avi".

As Yellowman says, if this is an fstab mount, use /mnt not /media or /run/media.

3rd August 2012, 02:37 PM
I always mount in /media and have no problems with that. You won't get a shortcut to the mount on your desktop when you mount in /mnt.

3rd August 2012, 04:49 PM
Tried mounting it in /mnt there is no difference still cant open video files (can't open ANY files for that matter - always says permission denied). I can open things when I'm root no matter which way it's mounted.

output for "mount | grep STORAGE"

/dev/sdc5 on /run/media/user/STORAGE type ext3 (rw,nosuid,nodev,relatime,seclabel,data=ordered,uh elper=udisks2)

output for "ls -l /run/media/user/STORAGE/Storage/video.avi".

-rw-------. 1 root root 1161334784 Mar 18 2007 /run/media/user/STORAGE/Storage/video.avi

As soon as I give myself read/write priveleges I can open whatever I want. Might it be that I need to give the user execute priveleges on the partition as well as read priveleges?

3rd August 2012, 05:08 PM
You can try to take ownership of the files using chown command:

chown -hR username /mountpoint

4th August 2012, 01:15 AM
Ok this is strange. I booted up this morning without having changed anything since my last post and now everything works fine.

Gareth Jones
4th August 2012, 01:54 PM
The mount output looks reasonable.


output for "ls -l /run/media/user/STORAGE/Storage/video.avi".

-rw-------. 1 root root 1161334784 Mar 18 2007 /run/media/user/STORAGE/Storage/video.avi

This is read-write for root, and unreadable to normal users. The correct permissions for what you're asking for are "rw-r--r--" (i.e. "chmod a+r /run/.../vidio.avi"). Make sure that the containing directories have "r-x" set for all users too.

Rebooting shouldn't change the permissions, so I've no idea what you changed to make it work...

4th August 2012, 11:18 PM
I did give the normal user r/w permissions temporarily in order to be able to play the video then changed it back. Maybe this did something?