Thread: Linux folders permission - postgresql

Linux folders permission - postgresql

From
javier garcia
Date:
Hi;
I've got my data base in /var/lib/pgsql/data.
And in the booting of Linux appears a message:
su: atención. No se puede cambiar a /var/lib/pgsql, permiso denegado

(su: attention. We can't change to /var/lib/pgsql, denied permission)

The server belongs to a user named 'Javier'. And the permissión of
/var/lib/pgsql are:

drwxrwx---    5 javier   postgres     1024 dic 10 18:38 pgsql/

(javier and everybody in the group postgres have full access; and my root
belongs also to postgres group)

Please; can any of you tell me if these permissión are good option and why
I've got that message?

Thanks and regards,

Javier

Re: Linux folders permission - postgresql

From
"scott.marlowe"
Date:
On Wed, 18 Dec 2002, javier garcia wrote:

> Hi;
> I've got my data base in /var/lib/pgsql/data.
> And in the booting of Linux appears a message:
> su: atención. No se puede cambiar a /var/lib/pgsql, permiso denegado
>
> (su: attention. We can't change to /var/lib/pgsql, denied permission)
>
> The server belongs to a user named 'Javier'. And the permissión of
> /var/lib/pgsql are:
>
> drwxrwx---    5 javier   postgres     1024 dic 10 18:38 pgsql/
>
> (javier and everybody in the group postgres have full access; and my root
> belongs also to postgres group)
>
> Please; can any of you tell me if these permissión are good option and why
> I've got that message?

the ONLY user that should have ANY access to the pgsql directory is the
one who is running postgresql.  So, the permissions should be:

drwx------    5 javier   javier     1024 dic 10 18:38 pgsql/

and all directories and files under that as well should have, at MOST 700
permissions set on them.


Re: Linux folders permission - postgresql

From
Tom Lane
Date:
javier garcia <andresjavier.garcia@wanadoo.es> writes:
> The server belongs to a user named 'Javier'. And the permissi�n of
> /var/lib/pgsql are:
> drwxrwx---    5 javier   postgres     1024 dic 10 18:38 pgsql/
> (javier and everybody in the group postgres have full access; and my root
> belongs also to postgres group)

Perhaps /var or /var/lib doesn't offer r+x permission?  Also look into
just what the boot script is trying to "su" to.

            regards, tom lane