Sometimes I have the situation where the access rights look like this:
Code: Select all
drwx------ 280 pi pi 16384 Oct 25 11:29 Data
[SOLUTION]
Thanks to StackExchange answer by user "WombleGoneBad", here's a great 2-liner:
Code: Select all
$ find /path/to/folder -type d -exec chmod 755 {} \;
$ find /path/to/folder -type f -exec chmod 644 {} \;
NOTE: This removes executable rights from files.
This is usually not a problem with data-storage only folders, but definitely a no-go when applied to operating system folders and such.
Needed this 2-lines so often that I found it worth writing it down
It's all in a day's work for "recursive find permission change"!