Skip to content

Instantly share code, notes, and snippets.

@kelsS
Created July 28, 2017 21:14
Show Gist options
  • Select an option

  • Save kelsS/bddec307f335d4f4b0875e1272221dca to your computer and use it in GitHub Desktop.

Select an option

Save kelsS/bddec307f335d4f4b0875e1272221dca to your computer and use it in GitHub Desktop.
Docker for Windows file permissions issue. Find all files not under current user permssions and change the files to the new user. Shell script located on host OS shared drive but executed inside Linux Container.
#!/bin/bash
# the command doing the real work has an exit status here
status=$? # save it
find . -not -uid $(stat -c "%u" .) -exec chown --reference=. {} \;
exit $status # exit with the saved status value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment