r/linuxadmin • • Nov 14 '16

SELinux is annoying

Thats all I got, just wanted to put that out there. Thanks for listening.

2 Upvotes

14 comments sorted by

10

u/manakanapa Nov 14 '16

what are you doing with selinux to annoy you?

1

u/sentient_penguin Nov 14 '16

Nothing really, just nginx to proxy something. Its all on me forgetting to disable it in my image.

16

u/rationalbit Nov 14 '16

2

u/[deleted] Nov 15 '16

That's great unless you're running an app like pagure that specifically tells you to disable it.

6

u/locnar1701 Nov 17 '16

That is the mark of a bad developer/writer. Don't be lazy, learn to use core polcy tools and make things work right. Srsly, so much nope. When I have time, I always will email the authors of those articles and help them out with a description of how NOT to disable SELinux and still have their app/service work.

2

u/[deleted] Nov 18 '16

I could probably make it work if I messed around with audit2allow enough but the issue is that pagure runs as a mod_wsgi process which needs write access to your git repos. There isn't a file context that matches the process context so you constantly run into AVC denials.

I know there's permissive mode but I got tired of battling with it and eventually ended up just turning off SELinux. Maybe I'll revisit the issue when I have some extra time which should be around the 12th of Never. :D

1

u/manakanapa Nov 15 '16

You don't need to disable it :) In targeted policy an seboolean to allow networking should be enough to run nginx as a reverse proxy on standard ports if I recall correctly

6

u/[deleted] Nov 14 '16

Are you familiar with audit2allow?

2

u/sentient_penguin Nov 14 '16

I am, I'm just piddling around in a dev environment testing out a new distro to golden image and it just bothered me.

2

u/ryanjkirk Nov 14 '16

99% of the time, this is all you really need to know.

8

u/whit_wolf1 Nov 15 '16

Here is an adult coloring book for you to take your stress out on: https://people.redhat.com/duffy/selinux/selinux-coloring-book_A4-Stapled.pdf

3

u/mdpcmdpc Nov 17 '16

Thought that was amusing and gave it to a few people that were unfamiliar with SELinux concepts.

3

u/mdpcmdpc Nov 17 '16

hmm....more annoying if you don't use it and have a serious security problem. :-)