# user permissions: cant execute some programs

## liquis

hello

I cany get my user account to access some programs, but it can access others.  The consistency seems to be any program which is not automatically loaded into the gnome menu system is locked. such as programs in /usr/games/bin

The root can run these programs however

Mplayer in /usr/bin is another example in which only root can run it.

What do I need to do to give user access?  I really want to be able to do most things as user.

here's my fstab:

/dev/hda1               /boot           ext2            noauto,noatime          1 2

/dev/hda3               /               ext3            uid=1000,noatime                        0 1

/dev/hda2               none            swap            sw                      0 0

/dev/hdb1               /mnt/30port_sub ntfs            uid=1000,users,rw,noatime                 0 1/dev/hdb2               /mnt/30port     ntfs            uid=1000,users,rw,noatime                 0 1/dev/hde1               /mnt/160drive   ntfs            uid=1000,users,rw,noatime                 0 1/dev/cdroms/cdrom0      /mnt/cdrom      auto            uid=1000,user,noauto,ro         0 0

/dev/fd0                /mnt/floppy     auto            uid=1000,user,rw,noauto         0 0

thanks

----------

## oumpah-pah

In order to play games, you must add yourself into the games group (read usermod manpage).

----------

## liquis

sorry, let me clean that up....

/dev/hda1                 /boot                  ext2            noauto,noatime                        1 2

/dev/hda3                 /                          ext3            uid=1000,noatime                     0 1

/dev/hda2                 none                   swap            sw                                           0 0

/dev/hdb1                 /mnt/30port_sub ntfs            uid=1000,users,rw,noatime       0 1

/dev/hdb2                 /mnt/30port        ntfs            uid=1000,users,rw,noatime       0 1

/dev/hde1                 /mnt/160drive     ntfs            uid=1000,users,rw,noatime        0 1

/dev/cdroms/cdrom0 /mnt/cdrom        auto            uid=1000,user,noauto,ro            0 0

/dev/fd0                    /mnt/floppy        auto            uid=1000,user,rw,noauto           0 0

----------

## liquis

so like,

# usermod -G username /dev/hda3

or does it have to be more specific like this?

# usermod -G username /usr/games/bin,/usr/bin

----------

## Oxyron

It should be like:

```
usermod -G groups,you,already,are,in,games username
```

For Mplayer try:

```
chmod a+x /usr/bin/mplayer
```

----------

## liquis

 *Oxyron wrote:*   

> It should be like:
> 
> ```
> usermod -G groups,you,already,are,in,games username
> ```
> ...

 

if you could please dumb it down for me... should this look like specifically?

```
usermod -G groups,you,already,are,in,games username
```

i tried:

```
chmod a+x /usr/bin/mplayer
```

and it still did not give my user access for that program.

thanks

----------

## oumpah-pah

Ok, first, in your fstab, you should remove the uid option from your root parition. I don't think this is the cause of your problem, but it's certainly useless.

Then you should post the output of

```
ls -l /usr/bin/mplayer
```

and the output of

```
groups username
```

where username is, well, your username.

[EDIT]

You can also post the output of

```
echo $PATH
```

(run it as your regular user).

----------

## liquis

removed the uid from hda3

pasting outputs:

```

root # ls -l /usr/bin/mplayer

-rwxr-xr-x  1 root root 4288904 Sep 29 15:20 /usr/bin/mplayer
```

```
root # groups liquis

bin tty wheel audio games users

```

and from user mode:

```
liquis $ echo $PATH

/bin:/usr/bin:/usr/local/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3:/usr/X11R6/bin:

/opt/blackdown-jre-1.4.1/bin:/usr/qt/3/bin:/usr/kde/3.3/bin:/usr/games/bin

```

EDIT:  Split long $PATH line into two. --pjp

----------

## oumpah-pah

Permissions of mplayer are okay, as well as groups and path. So let's try this: can you, as a regular user, access the /usr/bin directory?

----------

## pjp

Moved from Desktop Environments.

----------

## liquis

yes, i can access /usr/bin

as well as /usr/games/bin --- but i had to enable access with this: 

```
chmod a+rwx /usr/games/bin
```

 but apparently the execute enable isnt working

i have installed other programs such as xchat and gimp, those are able to be run by the user, but the difference is the programs that need to be run from the directory (as opposed to the gnome menu) wont work (but they do work for root).

----------

## oumpah-pah

What do you mean by "need to be run from the directory"?

----------

## liquis

some programs are automatically loaded into the gnome menu system when installed, and others have to be accessed by going to /usr/bin (for example) and running the program...

----------

## oumpah-pah

If you want to run a program from the command line, you do not need to go in the directory of the program. To run mplayer for example, just type 'mplayer' from any directory.

----------

## liquis

```
# ls -l /usr/games/bin/armagetron

-rwxrwxrwx  1 root root 437 Sep 30 16:00 /usr/games/bin/armagetron
```

theres the output for one of the games i cant play as user

----------

## Oxyron

Type `mplayer` into the prompt (as a normal user) and show us (paste) the exact output.

----------

## liquis

Hello, thanks for replying, here's the output:

```
liquis $ mplayer

MPlayer 1.0pre4-3.3.4 (C) 2000-2004 MPlayer Team

CPU: Advanced Micro Devices Athlon MP/XP/XP-M Barton 2323 MHz (Family: 6, Steppi ng: 0)

Detected cache-line size is 64 bytes

MMX supported but disabled

MMX2 supported but disabled

SSE supported but disabled

3DNow supported but disabled

3DNowExt supported but disabled

CPUflags:  MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0

Compiled for x86 CPU with extensions:

Reading config file /usr/share/mplayer/mplayer.conf

Reading config file /home/liquis/.mplayer/config

Reading /home/liquis/.mplayer/codecs.conf: Can't open '/home/liquis/.mplayer/cod ecs.conf': No such file or directory

Reading /usr/share/mplayer/codecs.conf: 66 audio & 176 video codecs

Usage:   mplayer [options] [url|path/]filename

Basic options: (complete list in the man page)

 -vo <drv[:dev]>  select video output driver & device ('-vo help' for a list)

 -ao <drv[:dev]>  select audio output driver & device ('-ao help' for a list)

 vcd://<trackno>   play (S)VCD (Super Video CD) track (raw device, no mount)

 -ss <timepos>    seek to given (seconds or hh:mm:ss) position

 -nosound         do not play sound

 -fs              fullscreen playback (or -vm, -zoom, details in the man page)

 -x <x> -y <y>    set display resolution (for use with -vm or -zoom)

 -sub <file>      specify subtitle file to use (also see -subfps, -subdelay)

 -playlist <file> specify playlist file

 -vid x -aid y    select video (x) and audio (y) stream to play

 -fps x -srate y  change video (x fps) and audio (y Hz) rate

 -pp <quality>    enable postprocessing filter (details in the man page)

 -framedrop       enable frame dropping (for slow machines)

Basic keys: (complete list in the man page, also check input.conf)

 <-  or  ->       seek backward/forward 10 seconds

 up or down       seek backward/forward  1 minute

 pgup or pgdown   seek backward/forward 10 minutes

 < or >           step backward/forward in playlist

 p or SPACE       pause movie (press any key to continue)

 q or ESC         stop playing and quit program

 + or -           adjust audio delay by +/- 0.1 second

 o                cycle OSD mode:  none / seekbar / seekbar + timer

 * or /           increase or decrease PCM volume

 z or x           adjust subtitle delay by +/- 0.1 second

 r or t           adjust subtitle position up/down, also see -vf expand

 * * * SEE THE MAN PAGE FOR DETAILS, FURTHER (ADVANCED) OPTIONS AND KEYS * * *

```

Contrary to what happens if i use the browser to open the file, in which case, if you're familiar with Gnome, mplayer has a purple diamond icon with a yellow and white lock symbol on it.  Double clicking it does nothing.

----------

## Oxyron

Mplayer seems to work, but you need to pass a video file as a parameter to it:

```
mplayer file.avi
```

Or just use the gtk frontend gmplayer (it is included with mplayer if you have the gtk USE flag in your make.conf).

----------

## liquis

thanks, the gtk frontend does work for the user.... is there a way around these limits for the user, or is there a simple way to make gtk frontends for programs?

----------

## wwwbug

thanks for those reply,i can learn very much too!and is there more for it?

----------

