Hi<br>
<br>
Used the 'mount --bind', worked well for me. Thanks.<br>
<br>
But I was wondering why it is not possible to configure Selinux to have the Postgresql data directory under /mnt?<br>
<br>
/markus<br><br><div><span class="gmail_quote">On 2/10/06, <b class="gmail_sendername">Paul Howarth</b> <<a href="mailto:paul@city-fan.org">paul@city-fan.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Thu, 2006-02-09 at 20:10 +0100, Markus Lindholm wrote:<br>> Hi<br>><br>> I have a FC4 box (all updates applied) on which I have a Postgresql<br>> server (standard fedora rpms) and I'm running targeted selinux policy.
<br>> The problem is that I cannot move the data directory away<br>> from /var/lib/pgsql/data with out turning selinux off.<br>><br>> Is there any HOWTOs out there that would be helpful?<br>><br>> I've tried using chcon so that the permission would be identical
<br>> between the new and the old<br>><br>> [root@zeus ~]# ls -ldZ /var/lib/pgsql/data/<br>> drwx------  postgres postgres<br>> system_u:object_r:postgresql_db_t /var/lib/pgsql/data/<br>> [root@zeus ~]# ls -lZd /mnt/raid/db/pgsql/data/
<br>> drwx------  postgres postgres<br>> system_u:object_r:postgresql_db_t /mnt/raid/db/pgsql/data/<br>><br>> But I still get permission denied when I try to start postgresql !! If<br>> I mark the "Disable SELinux protection for Postgresql daemon" in the
<br>> SELinux GUI, then it starts up fine.<br>> But what would be the correct way to handle this?<br><br>Why are you moving the data directory in the first place?<br><br>If it's for space reasons, an alternative approach might be simply to
<br>mount your target partition on /var/lib/pgsql/data; if you're not using<br>an entire partition, you could use a bind mount:<br><br># mount --bind /mnt/raid/db/pgsql/data /var/lib/pgsql/data<br><br>Paul.<br><br>--<br>fedora-selinux-list mailing list
<br><a href="mailto:fedora-selinux-list@redhat.com">fedora-selinux-list@redhat.com</a><br><a href="https://www.redhat.com/mailman/listinfo/fedora-selinux-list">https://www.redhat.com/mailman/listinfo/fedora-selinux-list</a>
<br></blockquote></div><br>