mineshaftgap / d4m-nfs

Docker for Mac with NFS for performance improvements over osxfs
296 stars 26 forks source link

Local folder permissions got totally messed up #27

Closed greggilbert closed 7 years ago

greggilbert commented 7 years ago

So I ran d4m-nfs.sh on its own and it installed just fine. For some reason, after doing that, all of the files in the mount got their permissions reassigned to 1000 _appstore. So while the files were accessible within the mount, OSX considered them read-only since my local user didn't have permissions. Once I reset the permissions, the mount started to fail with permissions issues.

Here's the /etc/exports that it generated:

# d4m-nfs exports
"/Users/greg" -alldirs -mapall=503:20 localhost

Any ideas?

if-kenn commented 7 years ago

@greggilbert as you can see from https://github.com/IFSight/d4m-nfs/search?utf8=%E2%9C%93&q=chown does not change the ownership of any file on your Mac. Instead it allows NFS, which is a very well worn protocol, handle how uid/gid should be should be mapped (mapped, not changed). This also has not been reported from the hundreds of users, a situation like this which I would think would raise a serious alarm with users.

When I googled for 1000 "_appstore"

One of your issues came up from another project back in March of last year:

https://github.com/nlf/dlite/issues/129

So my guess is that it is directly related to you using the https://github.com/nlf/dlite project.

greggilbert commented 7 years ago

I think this is actually being caused by me doing chowns in entrypoint, e.g.:

chown -R www-data:www-data /www

Doing that over a mounted volume causes all sorts of weirdness. Would the nfs mount cause that?

if-kenn commented 7 years ago

Hey @greggilbert. NFS maps UIDs, you are exporting it as your Mac user, if you want to be able to "extraordinary" things that you Mac user would not be able to do, such as change the ownership of a file, you most likely need to have NFS export it as your Mac root user, so that it can be manipulated inside your Docker container. If you want further help, open a new issue and provide the following:

  1. screenshot of Docker for Mac's Preferences -> File Sharing
  2. attachment of d4m-nfs/etc/d4m-nfs-mounts.txt
  3. attachment of /tmp/d4m-mount-nfs.sh
  4. attachment of /tmp/d4m-nfs-mounts.txt
  5. attachment of /etc/exports