Sorry it took me so long to reply back. It's been a busy weekend. <br><br>Bind mounting worked. I actually changed /home/ to /Data and bind mounted /home/ onto /Data/home and then created /Data/pgsql, changing the default context to those of /var/lib/pgsql. That didn't work, even when I changed /Data to system_u:object_r:var_t, /Data/pgsql to system_u:object_r:var_lib_t, and /Data/pgsql/data to system_u:object_r:postgresql_db_t. I thought maybe selinux only allowed transition to var_lib_t from var_t, and then to postgres_db_t from var_lib_t. Is that how it works with the directory hierarchy?
<br><br>Anyway, I moved /var/lib/pgsql /var/lib/pgsql.bk, bind mounted /Data/pgsql/ to /var/lib/pgsql and remove /etc/sysconfig/pgsql/postgresql. That worked. I just hope the developers don't see stuff like that as a security hole and fix it.
<br><br>Have they changed the wiki? It seems like they have more useful info in there, than what I've found in the past. Then again, most of my visits to the wiki were from Google links. Maybe I just needed to visit the home page.
<br><br>Thanks for all your help.<br>Jim Young<br><br><div><span class="gmail_quote">On 1/12/07, <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;">
James Young wrote:<br>> Does selinux check context on the whole directory hierarchy when making a<br>> decision about permission to enter a directory? That is, when I try to<br>> access /home/Data/pgsql, will it check the context on /home, then
<br>> /home/Data, and then on /home/Data/pgsql? Or will it only check the context<br>> on /home/Data/pgsql?<br>><br>> I want to put a Postgres database in a /home/Data/pgsql/data directory, but<br>> the initrc script will not run it there. I can run it as the postgres user.
<br>> The contexts mirror the /var/lib/pgsql/data directory:<br>> user_u:object_r:postgres_db_t. The context of /home/Data/pgsql is<br>> system_u:object_r:var_lib_t.<br><br>The whole hierarchy must be readable. Putting server data under /home
<br>always causes problems. I'd suggest bind mounting /home/Data/pgsql to<br>/var/lib/pgsql or something similar.<br><br>You could change the context type of /home/Data to var_t but you'd<br>probably still have issues with /home itself.
<br><br>> Does Fedora use the reference policy from Tresys exactly? If not, where can<br>> I find the source policy for Fedora. All I can find are the if files.<br><br>The selinux-policy SRPM.<br><br>> Finally, are there any better references for selinux. Everything I've read
<br>> seems dated.<br><br><a href="http://fedoraproject.org/wiki/SELinux">http://fedoraproject.org/wiki/SELinux</a> is a decent starting point.<br><br>Paul.<br><br></blockquote></div><br>