Score:0

set the permissions on all the files and folders within a directory (CentOS 7.0 )

jp flag

I kind of new to Linux/Centos world, is there any way to set the permissions on all the files and folders within a directory. I know chmod 777 will set permissions on the directory, but if it already has contents, I need to know how to set that too. In windows, you propagate the permission down, must be a way to do that in Linux. Thanks.

Score:0
sb flag

Please see the -R, --recursive flag

Link to the documentation

OPTIONS

<...omitted for brevity...>

       -R, --recursive
              change files and directories recursively
Ginnungagap avatar
gu flag
Mandatory comment that `chmod 777` is garbage and should never be performed, much less so with `--recursive` and even less so when you don't know `--recursive` without asking on StackOverflow.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.