Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to set appropriate permissions on /dev/dri/* devices #146

Merged
merged 1 commit into from
Dec 31, 2020
Merged

Add script to set appropriate permissions on /dev/dri/* devices #146

merged 1 commit into from
Dec 31, 2020

Conversation

kabadisha
Copy link

I have been investigating how to enable hardware acceleration and found that it requires the www-data user to have permission on /dev/dri/* devices. A lot of people seem to be happy to just set the permissions to 666 on /dev/dri*, however that doesn't seem like a great solution.

In the end, I found a really elegant solution to the permissions issue that the guys over at linuxserver used for their Plex image.

The script is a direct clone of their version, I have just added some echos to show what is going on and changed the user to the www-data one we use for ZoneMinder.

It adds the www-data user to the appropriate group(s) if they already exist or creates new groups as required.
This has the benefit of meaning that you don't have to mess with the permissions of the /dev/dri/* devices on the host.

Hope this makes sense.

FYI, this is my first PR to an open source project, so apologies if I missed any steps or etiquette.

@dlandon
Copy link
Owner

dlandon commented Dec 31, 2020

I'll take a look at this.

@dlandon dlandon merged commit 2d4525f into dlandon:master Dec 31, 2020
@kabadisha kabadisha deleted the setup-gpu-permissions branch December 31, 2020 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants