Обсуждение: Postmaster start up problems (can't create lock file )

Поиск
Список
Период
Сортировка

Postmaster start up problems (can't create lock file )

От
"Jasbinder Singh Bali"
Дата:
I'm trying to start my postgres server and it gives me the following errror

FATAL:  could not create lock file "/var/run/postgresql/.s.PGSQL.5432.lock": Permission denied

Now obviously to touch the file that the error message is talking about, one needs root permission that the user account under which my postmaster is runnnig doesn't have.

Can anyone tell me the fix.

Thanks

Re: Postmaster start up problems (can't create lock file )

От
"Patrick Lindeman"
Дата:
You could chown the directory /var/run/postgresql/ to the user postgres is
running as. You might need root access for that as well, in case you dont
have it you could ask your sysadmin to do it.

Regards,
Patrick Lindeman


> I'm trying to start my postgres server and it gives me the following
> errror
>
> FATAL:  could not create lock file
> "/var/run/postgresql/.s.PGSQL.5432.lock":
> Permission denied
>
> Now obviously to touch the file that the error message is talking about,
> one
> needs root permission that the user account under which my postmaster is
> runnnig doesn't have.
>
> Can anyone tell me the fix.
>
> Thanks
>


Re: Postmaster start up problems (can't create lock file )

От
"Jasbinder Singh Bali"
Дата:
how good an idea it is to chown <special user> all the postgres related files

On 8/14/07, Patrick Lindeman < patrick@my-mac.nl> wrote:
You could chown the directory /var/run/postgresql/ to the user postgres is
running as. You might need root access for that as well, in case you dont
have it you could ask your sysadmin to do it.

Regards,
Patrick Lindeman


> I'm trying to start my postgres server and it gives me the following
> errror
>
> FATAL:  could not create lock file
> "/var/run/postgresql/.s.PGSQL.5432.lock":
> Permission denied
>
> Now obviously to touch the file that the error message is talking about,
> one
> needs root permission that the user account under which my postmaster is
> runnnig doesn't have.
>
> Can anyone tell me the fix.
>
> Thanks
>


---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

                http://www.postgresql.org/about/donate

Re: Postmaster start up problems (can't create lock file )

От
Steve Crawford
Дата:
Patrick Lindeman wrote:

>> I'm trying to start my postgres server and it gives me the following
>> errror
>>
>> FATAL:  could not create lock file
>> "/var/run/postgresql/.s.PGSQL.5432.lock":
>> Permission denied
>>

This looks like an Ubuntu or similar install. I believe the standard
PostgreSQL default for unix_socket_directory is /tmp but this can be
changed at build-time. The build Ubuntu provides defaults to
/var/run/postgresql. Other Debian-based distros may do something similar.

In any case, the normal PostgreSQL install for your distro should start
fine via the init scripts such as (Ubuntu style):

sudo /etc/init.d/postgresql-8.2 start

But if you are trying a to run an instance of the PostgreSQL server
owned by your local user, you need to ensure that the unix socket
directory is writable by the user that owns the PostgreSQL server
process. Try:

unix_socket_directory='/tmp'

Cheers,
Steve