Skip to content

Instantly share code, notes, and snippets.

@StudioEtrange
Last active January 31, 2018 14:28
Show Gist options
  • Save StudioEtrange/da3576a41ee93bef889d30f2c55109cc to your computer and use it in GitHub Desktop.
Save StudioEtrange/da3576a41ee93bef889d30f2c55109cc to your computer and use it in GitHub Desktop.
Determine the user + group which has ownership of a binary
  • Determine the user + group which has ownership :
stat --format '%U:%G' "/bin/path"

ownership="$(stat --format '%U:%G' '/bin/path')"
  • Update ownership & right :
sudo chown -R $ownership "/bin/path"
sudo chmod -R 770 "/bin/path"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment