Re: Possible Bug - error creating a tablespace

Поиск
Список
Период
Сортировка
От Gabriel Ramirez
Тема Re: Possible Bug - error creating a tablespace
Дата
Msg-id 4ABADF59.7010608@gmail.com
обсуждение исходный текст
Ответ на Re: Possible Bug - error creating a tablespace  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 09/23/2009 04:30 PM, Tom Lane wrote:
> Kevin Kempter <kevink@consistentstate.com> writes:
>> 4) Here's the weird part:
>> -- If I start the cluster via "sudo /etc/init.d/postgres start" and then try
>> and create a tablespace it fails with :
>
>> create tablespace benchmark2 location '/eq5/pwbbench';
>> ERROR:  could not set permissions on directory "/eq5/pwbbench": Permission
>> denied
>
>> -- however if I start the db as user postgres with:
>
>> pg_ctl -D /var/lib/pgsql/data start
>> and then create the tablespace it works.
>
> SELinux ... in the first case SELinux recognizes the postmaster as being
> a daemon it ought to restrict, in the second case it just thinks it's
> an interactive program.
>
> In general, using tablespaces under SELinux requires labeling their root
> directories properly; postgresql_db_t if memory serves.
>
>             regards, tom lane
>

from my notes about Selinux and postgresql under Fedora 11.

try executing the following, in one line as root:

semanage fcontext -a --seuser system_u -t postgresql_db_t
'/eq5/pwbbench(/.*)?'

and after:

restorecon -R -v /eq5/pwbbench

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Log File Melancholy
Следующее
От: "Brendan Hill"
Дата:
Сообщение: Re: Idle processes chewing up CPU?