Monday, January 2, 2012

ptrace: Operation not permitted

I got above error when try to use Eclipse CDT to attach an running process for debugging.

It because of the ptrace protection since Ubuntu 10.10.

Here is the link to more detail explain
https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace%20Protection

To work around:
first need to enable root account
>sudo passwd root
>su
>echo 0 > /proc/sys/kernel/yama/ptrace_scope
>exit
re-disable root account for security reason
>sudo passwd -dl root

Now, it works

To permanently allow it edit /etc/sysctl.d/10-ptrace.conf and change the line to:
kernel.yama.ptrace_scope = 0

Monday, June 20, 2011

Git ---- denied: You cannot push changes not committed by you

If you get the PERMISSION DENIED error when try to push to a remote server, check the followings:
  • The author name and email should be the same as your git profile.
Expecially, the author name is FULL NAME of your profile on git server.

  • If you are using Linux, you also need to setup committer name and email to the same as git profile. otherwise, it will be youid@your_linux_host by default


To fix the permission problem:

>export GIT_COMMITTER_NAME="Your Fullname"
>export GIT_COMMITTER_EMAIL="Your Email"
>export GIT_AUTHOR_NAME="Your Fullname"
>export GIT_AUTHOR_EMAIL="Your Email"

//to back out the commit and index
>git reset HEAD^
//recommit and push again
>git commit
>git push