Project

General

Profile

Actions

Bug #9407

closed

memcached plugin not working with selinux enabled

Added by Gerwin Krist about 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Plugins
Target version:
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

Description

The memcached plugin is not working because passenger is not allowed to connect memcache_port_t

Reproduce:
  • Just install the ruby193-rubygem-foreman_memcache package and configure it to localhost
  • login on Foreman
Result:
  • In production log: DalliError: No server available
  • selinux logs: ruby system_u:system_r:passenger_t:s0 42 tcp_socket name_connect system_u:object_r:memcache_port_t:s0 denied 16180

Solutions

  1. setsebool -P passenger_can_connect_all=on (personally my last resort solution)
  2. Create a selinux module (See below)
module passenger_can_connect_memcache 1.0;

require {
        type passenger_t;
        type memcache_port_t;
        class tcp_socket name_connect;
}

#============= passenger_t ==============

#!!!! This avc can be allowed using the boolean 'passenger_can_connect_all'
allow passenger_t memcache_port_t:tcp_socket name_connect;

Related issues 1 (0 open1 closed)

Related to SELinux - Bug #9772: selinux should enable memcache pluginDuplicate03/15/2015Actions
Actions

Also available in: Atom PDF