preventing group change for files

Greetings.
I have encountered a somewhat puzzling problem, which is as follows:
To run NVIDIA CUDA applications on OS I need to have read-write access to:
/dev/nvidia0
/dev/nvidiactl
At least this is what I’ve found on stackexchange as a proposed cause of the message that the compiled application can not find any CUDA enabled device although the PC has one.
The solution proposed was as follows:

  1. change ownership of both files to root:root (user:group)
  2. change privileges to 666 (rw-rw-rw-)
    Being logged in as root I can do that - no problem in changing anything.

Now to the puzzling part:
If I log in as a normal user the problem of not being able to execute anything persists.
Looking at the files mentioned I then found, that:

  1. the group for both files changes to ‘video’
  2. permissions change to ‘rw-rw----’
    My question now is:
    Why do these changes occur automatically and how can I prevent the change of the group for these files?
    Additional information:
    System: openSuSe 11.4
    Kernel: 2.6.37.6-24-desktop
    Authentication: LDAP - based
    GPU: NVIDIA GT 630

Thanks in advance.

On 2013-02-02 12:56, Aquinox wrote:

> Why do these changes occur automatically and how can I prevent the
> change of the group for these files?

Those files are created on boot, so you have to change them back on
every boot.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

On 02/02/2013 12:56 PM, Aquinox wrote:
> System: openSuSe 11.4

11.4 is past its end of life (cite:
http://en.opensuse.org/Lifetime, no longer receiving security
patches through normal means. It therefore should not be exposed to
untrusted networks
unless it incorporates Evergreen, http://tinyurl.com/4aflkpy


dd
openSUSE®, the “German Engineered Automobile” of operating systems!

Aquinox wrote:

>
> Greetings.
> I have encountered a somewhat puzzling problem, which is as follows:
> To run NVIDIA CUDA applications on OS I need to have read-write access
> to:
> /dev/nvidia0
> /dev/nvidiactl
> At least this is what I’ve found on stackexchange as a proposed cause
> of the message that the compiled application can not find any CUDA
> enabled device although the PC has one.
> The solution proposed was as follows:
> 1. change ownership of both files to root:root (user:group)
> 1. change privileges to 666 (rw-rw-rw-)
> Being logged in as root I can do that - no problem in changing
> anything.
>
> Now to the puzzling part:
> If I log in as a normal user the problem of not being able to execute
> anything persists.
> Looking at the files mentioned I then found, that:
> 1. the group for both files changes to ‘video’
> 2. permissions change to ‘rw-rw----’
> My question now is:
> Why do these changes occur automatically and how can I prevent the
> change of the group for these files?
> Additional information:
> System: openSuSe 11.4
> Kernel: 2.6.37.6-24-desktop
> Authentication: LDAP - based
> GPU: NVIDIA GT 630
>
> Thanks in advance.
>
>

Add your userid to the ‘video’ group (YaST->Security and Users->User and
Group Management), log out/in and go for it!

Because this is default system configuration.

and how can I prevent the change of the group for these files?

Easier (for inexperienced users) is to add those users, who need access to this device, to group “video”. This also can be considered more secure.