문제

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 ?

도움이 되었습니까?

해결책

You could use find in order to execute the command only for files:

find . -type f -exec chmod g-s {} \;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top