Re: cannot access directory /pg_tblspc/*
От | Tom Lane |
---|---|
Тема | Re: cannot access directory /pg_tblspc/* |
Дата | |
Msg-id | 619.1150992859@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: cannot access directory /pg_tblspc/* (Charlie <perezchar@gmail.com>) |
Список | pgsql-novice |
Charlie <perezchar@gmail.com> writes: > Thanks a lot, I disabled security for postgresql service and it's running > perfectly now. > Will you please tell me what was selinux doing that prevented it from > working properly? Thanx a lot again! OK, the problem is probably that SELinux tries to prevent daemon processes from accessing parts of the filesystem that they're not supposed to access --- this is so that if someone manages to break into that service process, the amount of damage they can do using it is limited. In the case of postgres, the standard selinux policy says that only stuff under /var/lib/pgsql should be accessed during normal operation. If you want to have a custom tablespace somewhere else, you need to add that tablespace's directory to the selinux policy entry for postgres. Messing with selinux policy entries is not something I've ever had to do, but I think it's not hard if you read the documentation. The reason it worked after manually restarting the postmaster is probably that a process launched from a terminal window is not considered a system daemon and so selinux uses a weaker policy for it. Did you use /sbin/service to restart the postmaster, or did you do a manual "pg_ctl start" or some such? If you used /sbin/service I would've expected the system-daemon policy to apply still ... regards, tom lane
В списке pgsql-novice по дате отправления: