On 10/17/06, Leonel Nunez <[EMAIL PROTECTED]> wrote:

Correction to my   prior  mail

do this as root :

chcon system_u:object_r:postgresql_db_t  /opt/home/pgdata/mspace


When you need to know what config has any directory for SELinux
do a:

ls -lZ   /your/dir

and if you need  /your/otherdir  the same  set the configuration for
SELinux with  chcon

check the  /var/lib/pgsql  and you get :
[EMAIL PROTECTED] ~]# ls -lZ /var/lib/pgsql/
drwx------  postgres postgres system_u:object_r:var_lib_t      backups
drwx------  postgres postgres system_u:object_r:postgresql_db_t data
-rw-------  postgres postgres system_u:object_r:postgresql_log_t
pgstartup.lo

we set the SELinux permissions  to yourdir  as the permissions that
/var/lib/pgsql/data has

Thanks, this is exactly what I was looking for! To try it, I have to
wait for the next reboot, because in order to get moving, I checked

SELinux > Modify SELinux Policy > SELinux Service Protection > Disable
SELinux Protection for postgresql daemon

in system-config-securitylevel, and these kind of changes don't seem
to take effect until the next reboot (although I think they should; I
see 'avc: denied...' messages when I'm doing this, so there just may
be some other SELinux problems here).

Thanks a lot,

Andras

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org/

Reply via email to