Turning off SELinux

Debian Etch ships with SELinux turned on in permissive mode. This may interfere with custom installation paths. For example if you install Postgresql and want to place data on a special share using the tablespace directive, for example

CREATE TABLESPACE dataspace LOCATION '/data/myproject';

You may end up having permission errors using this command, even if you have created the directory in question and set the appropriate permissions for the postgres user. With the default policy SELinux doesn't permit postgresql to operate outside it's default installation paths. To turn off SELinux you can either install the selinux-utils package and run setenforce 0:

apt-get install selinuxsetenforce 0

To change this so that it is turned off after next reboot edit /etc/selinux/config and change the SELINUX variable from:

SELINUX=enforce

or

SELINUX=permissive

to

SELINUX=disabled

This is of course a quick way of dealing with the problem. If one wants to run SELinux then change the policy and relabel the directories affected.

Comments

Post new comment

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><pre>
  • Lines and paragraphs break automatically.

More information about formatting options

To combat spam, please enter the code in the image.