linux - Chmod 777 to a folder and all contents - Stack Overflow
Yes, very right that the -R option in chmod command makes the filessub-directories under the given directory will get 777 permission. But generally, its not a good practice to give 777 to all files and dirs as it can lead to data insecurity.
more