- 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"
stat --format '%U:%G' "/bin/path"
ownership="$(stat --format '%U:%G' '/bin/path')"
sudo chown -R $ownership "/bin/path"
sudo chmod -R 770 "/bin/path"