[MPlayer-users] Re: VIDIX problem

Jonathan Rogers jonner at teegra.net
Wed Jun 11 00:28:50 CEST 2003


Juan C. Gallardo wrote:
> chown root /usr/local/bin/mplayer
> chmod 750 /usr/local/bin/mplayer
> chmod +s /usr/local/bin/mplayer
> 
What told you to use those commands? Perhaps you should read the 
manpages on chown and chmod before using them.

> After doing this the VIDIX driver disapeared, and the player returned to
> look and act as the one that was installed with the SUSE original
> distribution and not as the one that I recompiled.
> 
> Can anyone explain to me what did I do, and how can I give the permission to
> the software in order to use the driver with any user?

You haven't give quite enough information, but I think I know exactly 
what happened. Tell me if I'm wrong on any point.

First, the system-installed MPlayer is "/usr/bin/mplayer". You compiled 
MPlayer from source, then installed it as root, which put it at 
"/usr/local/bin/mplayer". The directory "/usr/local/bin" comes before 
"/usr/bin" in your user's PATH, so now you get the recently-compiled one 
when you type "mplayer". The command "chown root /usr/local/bin/mplayer" 
caused root to become the user owner of "/usr/local/bin/mplayer", which 
probably didn't change anything. The command "chmod 750 
/usr/local/bin/mplayer" caused the user owner (root) and group owner (I 
don't know, but probably the root group) to be able to read and execute 
the file, while disallowing other users from doing anything with it. 
Your normal user is not in the group that owns "/usr/local/bin/mplayer", 
so you can no longer execute it. You get the system-installed one 
(probably at "/usr/bin/mplayer") now.

To confirm this, type "/usr/local/bin/mplayer" in the shell. It probably 
won't work. Also, notice the reported version whenever you start 
MPlayer. To fix the problem, you should first understand the basics of 
user and permission management in GNU/Linux (it's probably very similar 
to other *nixen). The manpages for chmod, chgrp, and the passwd and 
group config files (run "man 5 passwd" and "man 5 group", respectively) 
will help a lot. The following HOWTO's may also be informative:

<URL:http://tldp.org/HOWTO/Unix-and-Internet-Fundamentals-HOWTO/disk-layout.html#PERMISSIONS>
<URL:http://tldp.org/HOWTO/mini/Path.html>

Before messing with permissions, you should check how well "-vo xv" 
works. Xvideo is the best output method in many cases and it doesn't 
require any root privileges.

The best way to fix the problem would be to pick or create a group to 
own the mplayer binary. For instance, you could create a new group 
called "mplayer", cause it to own /usr/local/bin/mplayer, and put your 
user into the group.

A bad way to fix the problem would be to give everyone execute 
permission on "/usr/local/bin/mplayer", since this would be a huge 
security hole. Any program may be able to gain root privileges. It would 
be better to just use sudo or su to run mplayer as root.

Jonathan Rogers



More information about the MPlayer-users mailing list