나는 Postgres 데이터베이스에서 C 메소드를 함수로 사용하는 시스템을 가지고있다. 내 사용자 계정으로 gdb를 실행하려고하면 다음과 같이 표시됩니다. ptrace: Operation not permitted
포스트그레스를 디버그 할 수있는 권한을 얻는 방법?
권한이있는 것 같습니다. gdb를 "postgres"사용자로 돌릴 때 작동하는 것처럼 보였습니다. 포스트 그레스를 "postgres"사용자로 계속 실행하고 디버그 할 때 su postgres
할 필요가 없습니다. 문제의 프로세스에 대해 내 사용자 계정 "ptrace"권한을 어떻게 든 부여 할 수 있습니까? "postgres"그룹에 자신을 추가하는 것은 도움이되지 않았습니다.
편집 : 나는의 ptrace 남자 페이지에서 이걸 발견 :
EPERM The specified process cannot be traced. This could be because the parent has insufficient privileges (the required capability is CAP_SYS_PTRACE); non-root processes cannot trace processes that they cannot send signals to or those running set-user- ID/set-group-ID programs, for obvious reasons. Alternatively, the process may already be being traced, or be init(8) (PID 1).
그래서 어떻게 내 사용자에게 CAP_SYS_TRACE 권한을 부여 할 수 있습니까?
여기에서 물어보십시오. http://archives.postgresql.org/pgsql-hackers/ – leonbloy
루트 또는 포스트그레스로 ptrace를 실행 해 보았습니까? – teambob