What permission should i apply to a folder so that everyone can see the hierarchy and all the files inside but they should not be able to read and write them. The folder can have multiple other folders with files inside.
Listing directories uses the executable bit, I don't think read actually affects directories at all. You will have to set permissions on each individual file to prevent them from being read or written to. The following commands will do all this for you, execute them from the folder you want this to start at:
As grumbel pointed out in a comment, this will only work on well-behaved names. To get them all, either use his solution:
or find's builtin
Note that you can either quote the braces and semicolon like the first line, or escape them like the second, they just have to be there in separate arguments. Also,
|show 1 more comment|
username- current user
It helpful for read/write/execute permission