# how 2 change /dev/nvidiactl (Permission denied)  nonroot?

## temnozor

when i run wine as normal user i get this messages

```

NVIDIA: could not open the device file /dev/nvidiactl (Permission denied).

NVIDIA: Direct rendering failed; attempting indirect rendering.

NVIDIA: could not open the device file /dev/nvidiactl (Permission denied).

NVIDIA: Direct rendering failed; attempting indirect rendering.

```

when i do that as root it works

i changed with chmod 666 /dev/nvidiactl the permission then i can use wine...

but next time the permissions are again denied for normal user

----------

## jburns

Use the groups command and check if the video group is listed.

----------

## yabbadabbadont

Also, if the video group exists, make sure that your user is a member of that group.  You can use gpasswd to add a user to a group.  Finally, please post the contents of the /etc/modprobe.d/nvidia file.

----------

## temnozor

 *jburns wrote:*   

> Use the groups command and check if the video group is listed.

 

```

# groups

root bin daemon sys adm disk wheel floppy dialout tape video games

```

yes

----------

## temnozor

 *yabbadabbadont wrote:*   

> Also, if the video group exists, make sure that your user is a member of that group.  You can use gpasswd to add a user to a group.  Finally, please post the contents of the /etc/modprobe.d/nvidia file.

 

user was not in group video..but i added it now

```

$ groups temnozor

wheel audio video games

```

same problem no success

```

NVIDIA: could not open the device file /dev/nvidiactl (Keine Berechtigung).

NVIDIA: Direct rendering failed; attempting indirect rendering.

NVIDIA: could not open the device file /dev/nvidiactl (Keine Berechtigung).

NVIDIA: Direct rendering failed; attempting indirect rendering.

```

/etc/modeprobe.d/nvidia

```

# Nvidia drivers support

alias char-major-195 nvidia

alias /dev/nvidiactl char-major-195

# To tweak the driver the following options can be used, note that

# you should be careful, as it could cause instability!! For more

# options see /usr/share/doc/nvidia-drivers-173.14.09/README

#

# !!! SECURITY WARNING !!!

# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW

# WHAT YOU ARE DOING.

# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH,

# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE.

options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=27 NVreg_ModifyDeviceFiles=1

```

----------

## yabbadabbadont

You have to logout and back in before changes to group memeberships will take affect.  But, in case you have already done that, what is the output when you run the following command:

```
ls -l /dev/nv*
```

----------

## jburns

Try adding

```
Section "DRI"

   Mode 0666

EndSection
```

to your xorg.config if it does not already contain it.

----------

## temnozor

it worked, after relogin i was in that group

but one more question...

i put my user into groups disk and usb too now...but iam unable to mount /dev/sdb3 to /mnt/stuff as user

it says "only root can do that" it works when iam root or after putting mount into sudoers

but how to do it as user without sudo?

(partition is a fat32 on my external usb harddrive)

----------

## yabbadabbadont

Your normal user should not be a member of the disk group.  It is a security risk.  In order to allow a normal user to mount a device, the entry for it in /etc/fstab must include the "user" or "users" option.  Here is the entry that I have for my USB devices (thumb drive and camera):

```
/dev/sdb1     /mnt/usb      vfat         user,noauto,utf8,umask=007,gid=users,quiet      0 0
```

----------

