Issue
Unfortunately, I applied recursively SGID bit to my folder tree. SGID got set to any files or directories, though I only wanted to set SGID bit to folders. So I want to correct my mistake.
If I do a chmod -R g-s *
it will includes files and folders.
How can I remove SGID bit only to files in my folder recursively ?
Solution
You could use find
in order to execute the command only for files:
find . -type f -exec chmod g-s {} \;
Answered By - devnull Answer Checked By - Katrina (WPSolving Volunteer)