vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Remote container multiple users /tmp/docker-compose permission denied

Open mrchoke opened this issue 2 years ago • 8 comments

I use remote ssh & remote container from macOS to Ubuntu Linux server, under multiple users environment. If I start devcontainer before my friend my friend can not start if my friend start before me I can not start container too.

  • VSCode Version: 1.70.1
  • Local OS Version: macOS 13
  • Remote OS Version: Ubuntu 22:04.1 LTS
  • Remote Extension/Connection Type: SSH/Containers
  • Logs: I found this error.
[196289 ms] Writing docker-compose.devcontainer.containerFeatures-1660551312784.yml to /tmp/docker-compose
[178015 ms] Error: EACCES: permission denied, open '/tmp/docker-compose/docker-compose.devcontainer.containerFeatures-1660551312784.yml'
[178019 ms] Exit code 1

I check /tmp/docker-compose owner , it own by first person who start devcontainer. I think /tmp/docker-compose must be suffix or prefix with owner username or owner user ID or it can custom able in setting.

Step to reproduce

1st User

  1. Remote to linux server with Remote-SSH
  2. Open project has .devcontainer with docker-compose service

2nd User

  1. Remote to same linux server with Remote-SSH
  2. Open project has .devcontainer with docker-compose service

mrchoke avatar Aug 15 '22 09:08 mrchoke

Same issue here

lucas-garrido avatar Aug 19 '22 15:08 lucas-garrido

And if the second user do "Reopen in container" it will connect to the first user container without building a new one.

i dont know if its related but project without docker compose have unique id and the other one dont image

lucas-garrido avatar Aug 19 '22 15:08 lucas-garrido

And if the second user do "Reopen in container" it will connect to the first user container without building a new one.

i dont know if its related but project without docker compose have unique id and the other one dont

image

Yes if second user open same project name it will open existing, but if open other container it can't created temporary file in /tmp/docker-compose 😭

mrchoke avatar Aug 20 '22 06:08 mrchoke

Pending solution: build the container in command line then attach vscode to it.

lucas-garrido avatar Aug 22 '22 09:08 lucas-garrido

Same Problem here

suplstfdo avatar Sep 06 '22 09:09 suplstfdo

Pending solution: build the container in command line then attach vscode to it.

How can one build the dev container in command line?

suplstfdo avatar Sep 06 '22 09:09 suplstfdo

docker compose -p "containerName" up -d

lucas-garrido avatar Sep 06 '22 11:09 lucas-garrido

yeah, but the docker-compose file of the dev-container can't be created, because access to /tmp/docker-compose is prohibited. Where did you find the docker-compose file?

suplstfdo avatar Sep 06 '22 11:09 suplstfdo

Fixed in 0.253.0-pre-release. Will be fixed in the next stable release expected next week.

chrmarti avatar Sep 29 '22 06:09 chrmarti

This bug has been fixed in the latest pre-release!

@mrchoke, you can help us out by commenting /verified if things are now working as expected.

Happy Coding!

vscodenpa avatar Sep 30 '22 19:09 vscodenpa

Hi @mrchoke and @lucas-garrido, Were either of you able to verify that the issue has been fixed using the latest pre-release of the Dev Containers extension?

rzhao271 avatar Oct 06 '22 00:10 rzhao271

Hi @mrchoke and @lucas-garrido, Were either of you able to verify that the issue has been fixed using the latest pre-release of the Dev Containers extension?

Sorry for my late response @rzhao271 . I just installed VSCode insider.

It work fine for me now. Screenshot 2565-10-06 at 13 08 59

I use two username mrchoke and demo. VSCode can start devcontainer both. 😊

/verified

Thank you. 🙏

MrChoke

mrchoke avatar Oct 06 '22 06:10 mrchoke