Title: Installing extensions at system level (user: `root`, built-in location) throws an error · Issue #7042 · coder/code-server · GitHub
Open Graph Title: Installing extensions at system level (user: `root`, built-in location) throws an error · Issue #7042 · coder/code-server
X Title: Installing extensions at system level (user: `root`, built-in location) throws an error · Issue #7042 · coder/code-server
Description: Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: Safari v18.0.1 (20619.1.26.31.7) Local OS: macOS 15.0.1 (24A348) Remote OS: Debian 12 (bookworm) Remote Architecture: x86_64 code-se...
Open Graph Description: Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: Safari v18.0.1 (20619.1.26.31.7) Local OS: macOS 15.0.1 (24A348) Remote OS: Debian 12 (bookw...
X Description: Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: Safari v18.0.1 (20619.1.26.31.7) Local OS: macOS 15.0.1 (24A348) Remote OS: Debian 12 (bookw...
Opengraph URL: https://github.com/coder/code-server/issues/7042
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Installing extensions at system level (user: `root`, built-in location) throws an error","articleBody":"### Is there an existing issue for this?\n\n- [x] I have searched the existing issues\n\n### OS/Web Information\n\n- Web Browser: Safari v18.0.1 (20619.1.26.31.7)\n- Local OS: macOS 15.0.1 (24A348)\n- Remote OS: Debian 12 (bookworm)\n- Remote Architecture: x86_64\n- `code-server --version`: 4.94.2-rc.1 dd2e9fce277ff4f8699d9b4d9b41526943385e17 with Code 1.94.2\n\n\n### Steps to Reproduce\n\n1. Start container:\n\n ```bash\n docker run --rm -ti \\\n -u root \\\n -e NB_USER=root \\\n -e NB_UID=0 \\\n -e NB_GID=0 \\\n glcr.b-data.ch/jupyterlab/python/base:3.12.7-code-server-4.94.2-rc.1-linux-amd64 \\\n bash\n ```\n2. Install extension:\n\n ```bash\n code-server \\\n --extensions-dir /opt/code-server/lib/vscode/extensions \\\n --install-extension ms-python.python\n ```\n\n\n### Expected\n\n```\nInstalling extensions...\nInstalling extension 'ms-python.python'...\nExtension 'ms-python.debugpy' v2024.12.0 was successfully installed.\nExtension 'ms-python.python' v2024.16.1 was successfully installed.\n```\n\n### Actual\n\n```\nInstalling extensions...\nInstalling extensions...\nInstalling extension 'ms-python.python'...\nInstalling extension 'ms-python.python'...\n[2024-10-19T05:53:53.402Z] error parent:77 Uncaught exception: ENOTEMPTY: directory not empty, rename '/opt/code-server/lib/vscode/extensions/.4361a9d7-c95f-49fb-a7cf-6f4ae4201a3c' -> '/opt/code-server/lib/vscode/extensions/ms-python.debugpy-2024.12.0-linux-x64'\n[2024-10-19T05:53:53.403Z] error parent:77 Error: ENOTEMPTY: directory not empty, rename '/opt/code-server/lib/vscode/extensions/.4361a9d7-c95f-49fb-a7cf-6f4ae4201a3c' -> '/opt/code-server/lib/vscode/extensions/ms-python.debugpy-2024.12.0-linux-x64'\n at async Object.rename (node:internal/fs/promises:782:10)\n at async Object.nE (file:///opt/code-server/lib/vscode/out/vs/server/node/server.main.js:45:5381)\n at async yf.G (file:///opt/code-server/lib/vscode/out/vs/server/node/server.main.js:54:24201)\n at async yf.extractUserExtension (file:///opt/code-server/lib/vscode/out/vs/server/node/server.main.js:54:21240)\n at async zc.rb (file:///opt/code-server/lib/vscode/out/vs/server/node/server.main.js:54:14468)\n[2024-10-19T05:53:53.962Z] error parent:77 Uncaught exception: ENOTEMPTY: directory not empty, rename '/opt/code-server/lib/vscode/extensions/.0c81ab66-e49a-4744-af2d-3a7ca1755d35' -> '/opt/code-server/lib/vscode/extensions/ms-python.python-2024.16.1-universal'\n[2024-10-19T05:53:53.962Z] error parent:77 Error: ENOTEMPTY: directory not empty, rename '/opt/code-server/lib/vscode/extensions/.0c81ab66-e49a-4744-af2d-3a7ca1755d35' -> '/opt/code-server/lib/vscode/extensions/ms-python.python-2024.16.1-universal'\n at async Object.rename (node:internal/fs/promises:782:10)\n at async Object.nE (file:///opt/code-server/lib/vscode/out/vs/server/node/server.main.js:45:5381)\n at async yf.G (file:///opt/code-server/lib/vscode/out/vs/server/node/server.main.js:54:24201)\n at async yf.extractUserExtension (file:///opt/code-server/lib/vscode/out/vs/server/node/server.main.js:54:21240)\n at async zc.rb (file:///opt/code-server/lib/vscode/out/vs/server/node/server.main.js:54:14468)\nError while installing extensions: ENOTEMPTY: directory not empty, rename '/opt/code-server/lib/vscode/extensions/.0c81ab66-e49a-4744-af2d-3a7ca1755d35' -> '/opt/code-server/lib/vscode/extensions/ms-python.python-2024.16.1-universal'\nENOTEMPTY: directory not empty, rename '/opt/code-server/lib/vscode/extensions/.0c81ab66-e49a-4744-af2d-3a7ca1755d35' -> '/opt/code-server/lib/vscode/extensions/ms-python.python-2024.16.1-universal'\n```\n\n### Logs\n\nSee above.\n\n### Screenshot/Video\n\n\\-\n\n### Does this bug reproduce in native VS Code?\n\nThis cannot be tested in native VS Code\n\n### Does this bug reproduce in GitHub Codespaces?\n\nThis cannot be tested in GitHub Codespaces\n\n### Are you accessing code-server over a secure context?\n\n- [x] I am using a secure context.\n\n### Notes\n\nIt seems to work at *user level* (user: `root`) by executing `code-server --install-extension ms-python.python`, but `ls -al ~/.local/share/code-server/extensions` reveals\n\n```\ndrwx------ 4 root root 4096 Oct 19 06:00 .\ndrwxr-xr-x 9 root root 4096 Oct 19 06:00 ..\ndrwxr-xr-x 7 root root 4096 Oct 19 06:00 .b88d8567-9056-4934-883b-6ae404444689\n-rw-r--r-- 1 root root 804 Oct 19 06:00 extensions.json\ndrwxr-xr-x 5 root root 4096 Oct 19 06:00 ms-python.debugpy-2024.12.0-linux-x64\n```\n\nwhich does not look fine.\n\nFYI @code-asher ","author":{"url":"https://github.com/benz0li","@type":"Person","name":"benz0li"},"datePublished":"2024-10-19T06:07:41Z","url":"https://github.com/coder/code-server/issues/7042"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:db3cedb3-8c6c-2505-7c69-602b39534e4b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D660:E9D16:254D589:2F56C71:6B01C290 |
| html-safe-nonce | d3ece95a326a51f6859463f5d792856e6fd619680e8ce330342efb7ea494df31 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjYwOkU5RDE2OjI1NEQ1ODk6MkY1NkM3MTo2QjAxQzI5MCIsInZpc2l0b3JfaWQiOiI4NTcxODIzMjQ5MjgzOTkwMTYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4191a38b1bdc1246ba9e8df4526c41b6e45b1a54ab533a3b79df61a6c16dbc39 |
| hovercard-subject-tag | issue:2598794455 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/code-server/7042/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e6aef7a30a7b63ff0e0a80a2961a78f9e7a69f9ac0e9bbda6a025796ba2fb041/coder/code-server/issues/7042 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e6aef7a30a7b63ff0e0a80a2961a78f9e7a69f9ac0e9bbda6a025796ba2fb041/coder/code-server/issues/7042 |
| og:image:alt | Is there an existing issue for this? I have searched the existing issues OS/Web Information Web Browser: Safari v18.0.1 (20619.1.26.31.7) Local OS: macOS 15.0.1 (24A348) Remote OS: Debian 12 (bookw... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | benz0li |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/code-server git https://github.com/coder/code-server.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 172953845 |
| octolytics-dimension-repository_nwo | coder/code-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 172953845 |
| octolytics-dimension-repository_network_root_nwo | coder/code-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width