Linux: command to make folders recursively writable without affecting the permission of files inside them

StackOverflow https://stackoverflow.com/questions/20138097

  •  03-08-2022
  •  | 
  •  

Pregunta

Is it possible to make the folders writable recursively without affecting the files inside them using Linux command.

chmod 777 -R foldername - will make all folders and files inside the folder writable.

We've a website where we do not want the core files of a php framework writable, but at the same time we should be able to add new files.

¿Fue útil?

Solución

You can say:

find foldername -type d -exec chmod 777 {} \;

This would only change the file mode for the directories and not the files within those.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top