Subject: Re: Problem with gcore and permissions
To: None <firstname.lastname@example.org>
From: Christos Zoulas <email@example.com>
Date: 01/11/2005 19:41:37
In article <20050111173044.12a8c52a.darcy@NetBSD.org>,
D'Arcy J.M. Cain <darcy@NetBSD.org> wrote:
>On Tue, 11 Jan 2005 16:31:36 -0500
>firstname.lastname@example.org (Christos Zoulas) wrote:
>> On Jan 11, 3:02pm, darcy@NetBSD.org ("D'Arcy J.M. Cain") wrote:
>> -- Subject: Re: Problem with gcore and permissions
>> | On Tue, 11 Jan 2005 14:45:12 -0500
>> | email@example.com (Christos Zoulas) wrote:
>> | > The third reason is that the process cannot write to the directory
>> | > or file where the core is supposed to be generated. You can use
>> | > sysctl to change proc.<pid>.corename to something else, or update
>> | > to head and use gcore -c <corename> <pid>. Finally a better way is
>> | > to ktrace or attach gdb to it.
>> | I'm running this as root so I assume that directory permissions are
>> | not the issue.
>> If "this" refers to gcore, being root matters as far as getting
>> permission to trace the process to tell it to generate the core. If
>> the process being traced (in this case PostgreSQL) does not have the
>> right permissions to write the core file, then you'll get an error.
>> The core file is written using the PostgreSQL credentials.
>I assume that it drops it into the current directory. The process does
>have permissions there. Perhaps I need to make sure that the process is
>started in the pgsql directory.
To the current directory of the running process.
>Nope. I just tried to gcore the sshd, named, mountd and a few other
>root processes and none of them worked either.
They probably dropped cores in /