Skip to content

Instantly share code, notes, and snippets.

@cap10morgan
Created December 3, 2014 18:57
Show Gist options
  • Save cap10morgan/44bf796708ead61db4e3 to your computer and use it in GitHub Desktop.
Save cap10morgan/44bf796708ead61db4e3 to your computer and use it in GitHub Desktop.
wmorgan@docker1:~$ docker run --rm ubuntu /bin/bash -c 'echo -n; ls -l /proc/1/exe'
ls: cannot read symbolic link /proc/1/exe: Permission denied
lrwxrwxrwx 1 root root 0 Dec 3 18:56 /proc/1/exe
wmorgan@docker1:~$ docker run --rm --cap-add SYS_PTRACE ubuntu /bin/bash -c 'echo -n; ls -l /proc/1/exe'
ls: cannot read symbolic link /proc/1/exe: Permission denied
lrwxrwxrwx 1 root root 0 Dec 3 18:57 /proc/1/exe
wmorgan@docker1:~$ docker run --rm --privileged ubuntu /bin/bash -c 'echo -n; ls -l /proc/1/exe'
lrwxrwxrwx 1 root root 0 Dec 3 18:57 /proc/1/exe -> /bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment