2
我有使用了C的方法如在Postgres數據庫功能的系統。當我嘗試用我的用戶帳戶運行gdb時,我得到: ptrace: Operation not permitted
如何獲得調試postgres的權限?
它看起來像一個許可的事情。當我將gdb作爲「postgres」用戶運行時,它似乎工作正常。我想繼續將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 2010-06-04 16:18:45
您是否嘗試過ptrace的運行以根用戶或Postgres的? – teambob 2013-03-10 22:43:26