Matlab and SELinux

SELinux is an annoyance on single user desktop systems. Since I’m building RPMs, I have to test with SELinux on and off. I recently ran into problems getting Matlab 2007a (7.4) working in enforced mode. This is a single chcon command that worked for me.  It’s a sledgehammer, but it encompasses all arch’s.

chcon -R -t textrel_shlib_t /usr/local/matlab74/bin/*

I included this in my spec file under %post. Obviously, the path would depend on where you’re installing it to. I’m not sure if newer versions of the Matlab installer handle SELinux automatically.


About this entry