Score:2

Setting the permissions on all files inside a folder without changing the permissions of the folder itself?

cn flag

I have a folder called my_files. I want to:

  1. set the permissions to allow all users to read, write and execute the folder
  2. and set the permissions on all files inside my_files to allow all users to read and write

As a noob having read the manual (man chmod), I think that the first is accomplished with:

chmod a=rwx my_files

I know that the option -R applies the permissions recursively, but I don't believe that's what I want for #2. Do I instead navigate my directory to the folder and apply chmod a=rw?

Score:0
gb flag

If you change the permissions of the folder first, then the contents second (via /path/to/my_files/* instead of /path/to/my_files) you should be able to accomplish what you're looking to do.


Example:

chmod a=rwx /path/to/my_files/ && chmod a=rw /path/to/my_files/*
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.