title: Why is gdb requiring root permission to debug user programs?
body: <p>I have been using gdb quite successfully for a while, but I recently upgraded my version of Ubuntu, and now it seems that I can only get gdb to successfully run my program if I run as root.  That is, </p>
  
  <pre><code>~ %  gdb -q sleep -ex 'run 60'
  Reading symbols from /bin/sleep...(no debugging symbols found)...done.
  Starting program: /bin/sleep 60
  tcsh: Permission denied.
  During startup program exited with code 1.
  (gdb)
  </code></pre>
  
  <p>fails, whereas</p>
  
  <pre><code>~ %  sudo gdb -q sleep -ex 'run 60'
  Reading symbols from /bin/sleep...(no debugging symbols found)...done.
  Starting program: /bin/sleep 60
  Running .tcshrc
  warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
  ^C
  Program received signal SIGINT, Interrupt.
  0x00007ffff7adada0 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:82
  82  ../sysdeps/unix/syscall-template.S: No such file or directory.
  (gdb)
  </code></pre>
  
  <p>works.  One clue is that in the first case, the gdb startup doesn't run my .tcshrc file, whereas in the second case it does.  </p>
  
  <p>It seems that this is a simple permissions issue, which I must have fixed at one time, because in the past, I have never needed to run gdb as root.  After much googling, however, I wasn't able to find what I might have done (if I did in fact do something).   One possible fix - set <a href="https://askubuntu.com/questions/41629/after-upgrade-gdb-wont-attach-to-process">ptrace permissions</a> - didn't seem to work. </p>
  
  <p>Is there something that needs to be done to allow gdb to run programs without root privileges?  I know in OSX, gdb has to be codesigned.  Is there something similar for Ubuntu/Linux? </p>