linux - Chmod 777 to a folder and all contents - Stack Overflow 22 Yes, very right that the -R option in chmod command makes the files sub-directories under the given directory will get 777 permission But generally, it's not a good practice to give 777 to all files and dirs as it can lead to data insecurity Try to be very specific on giving all rights to all files and directories And to answer your question: