Need help with moving the data directory of Postgresql

Markus Lindholm markus.lindholm at gmail.com
Thu Feb 9 19:10:08 UTC 2006


Hi

I have a FC4 box (all updates applied) on which I have a Postgresql server
(standard fedora rpms) and I'm running targeted selinux policy.
The problem is that I cannot move the data directory away from
/var/lib/pgsql/data with out turning selinux off.

Is there any HOWTOs out there that would be helpful?

I've tried using chcon so that the permission would be identical between the
new and the old

[root at zeus ~]# ls -ldZ /var/lib/pgsql/data/
drwx------  postgres postgres system_u:object_r:postgresql_db_t
/var/lib/pgsql/data/
[root at zeus ~]# ls -lZd /mnt/raid/db/pgsql/data/
drwx------  postgres postgres system_u:object_r:postgresql_db_t
/mnt/raid/db/pgsql/data/

But I still get permission denied when I try to start postgresql !! If I
mark the "Disable SELinux protection for Postgresql daemon" in the SELinux
GUI, then it starts up fine.
But what would be the correct way to handle this?

/markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-selinux-list/attachments/20060209/3ddb9ec3/attachment.htm>


More information about the fedora-selinux-list mailing list