Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VirtioFS directory sharing has permission errors #6239

Closed
3 tasks done
boywijnmaalen opened this issue Mar 18, 2022 · 9 comments
Closed
3 tasks done

VirtioFS directory sharing has permission errors #6239

boywijnmaalen opened this issue Mar 18, 2022 · 9 comments

Comments

@boywijnmaalen
Copy link

boywijnmaalen commented Mar 18, 2022

  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics

Expected behavior

I started docker with the new VirtioFS accelerated directory sharing enabled. I would have expected I can run npm ci the same way as I can without the option VirtioFS accelerated directory sharing enabled.

NPM (installed for the current user) should have permissions to install dependencies in a directory that belongs to the current user.

Actual behavior

When expirimental option VirtioFS accelerated directory sharing is enabled I cannot run npm ci anymore.

As far as NPM is concerned the working directory does not have correct permissions to install dependencies. I can however still manually edit files using vim. NPM simply refuses to install dependencies.

NPM error log when expirimental option VirtioFS accelerated directory sharing is enabled:

Screenshot 2022-03-18 at 12 36 00

2022-03-18T11_34_31_175Z-debug-0.log

Information

  • macOS Version: 12.2.1
  • Intel chip or Apple chip: Apple
  • Docker Desktop Version: 4.6.0

I have a container in which I run my (Node) projects. Whenever I enable the expirimental option VirtioFS accelerated directory sharing I cannot run npm ci anymore.

If I shutdown my container, disable the expirimental option VirtioFS accelerated directory sharing, restart docker and restart the very same container, I can once again successfully use npm ci to install deps.

the issue is reproducable by simply enabling the expirimental option VirtioFS accelerated directory sharing again and NPM will stop working. (npm ci will work once again after I disable the expirimental option VirtioFS accelerated directory sharing).

Diagnistoc output

(the diagnostic output is exactly the same whenever the expirimental option VirtioFS accelerated directory sharing is enabled or disabled. it doesn't matter for the diagnostics)

A readable of the diagnostic output attached as an image
Screenshot 2022-03-18 at 12 27 13

docker diagnostics.txt

Steps to reproduce the behavior

See Information

@cosmith
Copy link

cosmith commented Mar 18, 2022

I'm having issues with this too with the postgresql image, it can't modify some files. Switching virtiofs off fixes it. Doing a chmod 777 on the shared folder doesn't help.

@yukotan
Copy link

yukotan commented Mar 18, 2022

I have same issue.

Information

  • macOS Version: 12.3
  • Intel chip or Apple chip: Intel
  • Docker Desktop Version: 4.6.0

Actual behavior

services:

  db:
    container_name: test_mysql8
    image: mysql:8
    ports:
      - '127.0.0.1:3306:3306'
    environment:
      MYSQL_ROOT_PASSWORD: hoge
      MYSQL_DATABASE: testdb
    volumes:
      - './volumes/mysql/mysqldata:/var/lib/mysql'

networks:
  default:
    name: test-net
$  docker compose up --build

...
test_mysql8  | 2022-03-18T20:38:57.039908Z 0 [ERROR] [MY-010954] [Server] Performance schema tables initialization failed.
test_mysql8  | 2022-03-18T20:38:57.040226Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
test_mysql8  | 2022-03-18T20:38:57.041200Z 0 [ERROR] [MY-010119] [Server] Aborting

Switching virtiofs off or delete "volumes" section, fixes it.

@spurin
Copy link

spurin commented Mar 19, 2022

I believe I'm having the same issue, I've documented it as follows with some quick reproducible steps - #6243

@robsontenorio
Copy link

robsontenorio commented Mar 19, 2022

On fresh installs like MariaDB I have similar permission error

ERROR: 29  File './mysql/' not found (Errcode: 13 "Permission denied")

I don't now why, but this solves the issue

docker/roadmap#7 (comment)

@hovsater
Copy link

Just got bitten by this myself. Had to disable VirtioFS for now.

@boywijnmaalen
Copy link
Author

@ALL;

Please visit the link mentioned below. I don't think this release has been officially released, however I just tried it and my permission issues seem to be fixed with this release. I started out with clearing/purging all Docker data, starting from scratch.

docker/roadmap#7 (comment)

@roboticflamingo
Copy link

I also have experienced this same issue with npm / yarn. Also with composer. All work fine with virtio FS disabled but so slow.

@cosmith
Copy link

cosmith commented Mar 25, 2022

ALL;

Please visit the link mentioned below. I don't think this release has been officially released, however I just tried it and my permission issues seem to be fixed with this release. I started out with clearing/purging all Docker data, starting from scratch.

docker/roadmap#7 (comment)

This does fix the issue for me, thanks!

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Apr 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants