A day in the life of Danny D'Amours

Google Earth and SELinux

Google has recently released Google Earth 5.2. There are some really nice new features including visualization of tracks captured by GPS devices.

Installing under Fedora Linux can be a bit of a challenge if you have SELinux enabled.

What is SELinux?

SELinux is feature which provides the ability to have access control policies which confines processes and users to the minimum required access level. For example the httpd process can be confines to only have access to files under it’s document root. Because of this confinement, there is a decreased risk if the httpd process were to become compromised and damage due to a security flaw is minimized.

Making Google Earth work with SELinux

The default install of Google Earth does not properly set the proper SELinux access controls and so if you have SELinux enabled, Google Earth will not start properly. One option with I’m sure that many people have done is to completely disable SELinux. Although this approach will get Google Earth working, it eliminates the benefits of SELinux and makes your computer less secure than it could be.

Recent versions of SELinux have a tool which gives suggestions of how to fix problems when violations occur. However on Fedora 13, the suggested command of ‘restorecon /usr/local/google-earth/googleearth-bin‘ didn’t fix the problem. I was still getting the error:

“./googleearth-bin: error while loading shared libraries: ./libcommon_webbrowser.so: cannot restore segment prot after reloc: Permission denied”

The key was to allow text relocation for the lib files in the install directory so typing in:

chcon -t textrel_shlib_t /usr/local/google-earth/lib*

Now Google Earth runs beautifully under SELinux.

Related Posts:

June 23rd, 2010 Posted by Danny D'Amours | Linux, Tech | no comments

No Comments »

No comments yet.

Leave a comment

css.php