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

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

  •  03-08-2022
  •  | 
  •  

문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top