Created
July 28, 2017 21:14
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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