You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
In docker container, second process cannot write to /proc/1/fd/1 #17551
On a classic linux system, the behavior of this command is to hang because cat attempts to read from its own output, but here we get a permission error.
A possible reason for the issue is the owner of stdio files in /dev is root, but the shell is running as the gitpod user:
$ ls -l /dev/
...
lrwxrwxrwx 1 nobody nogroup 15 Jun 26 17:27 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 nobody nogroup 15 Jun 26 17:27 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 nobody nogroup 15 Jun 26 17:27 stdout -> /proc/self/fd/1
...
$ ls -l /proc/self/fd/
total 0
lrwx------ 1 gitpod gitpod 64 Jun 26 18:15 0 -> /dev/pts/0
lrwx------ 1 gitpod gitpod 64 Jun 26 18:15 1 -> /dev/pts/0
lrwx------ 1 gitpod gitpod 64 Jun 26 18:15 2 -> /dev/pts/0
...
$ ls -l /dev/pts/
total 0
crw--w---- 1 root nogroup 136, 0 Jun 26 18:16 0
...
$ whoami
gitpod
This limitation seems excessive since those are virtual files that are unique to each process, opening them in read/write mode should be allowed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
loujaybee commentedon May 17, 2023
This does look related to the docker implementation in Gitpod.
achille-roussel commentedon Jun 26, 2023
I think I am running into a similar issue, accessing stdio files in
/devis also causing permission errors.Here is a simple step to reproduce:
On a classic linux system, the behavior of this command is to hang because
catattempts to read from its own output, but here we get a permission error.A possible reason for the issue is the owner of stdio files in
/devisroot, but the shell is running as thegitpoduser:This limitation seems excessive since those are virtual files that are unique to each process, opening them in read/write mode should be allowed.
Handle stdio permission error (#72)
github-actions commentedon May 22, 2024
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.