Pregunta

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 ?

¿Fue útil?

Solución

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

find . -type f -exec chmod g-s {} \;
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top