I often find myself in a situation where I go into the shell as root (they already tell me that this is bad practice) and copy the new files to some directory served by apache.
Since I am logged in as the root user, the new files will have the root set as the owner and different permissions than the files that are already present, and I will need to change the permissions for Apache to have access to the files. I do it manually.
I will explore the best way to do this. I was wondering if there is a way to somehow apply the permissions of the current folder to all its subfolders and files with one command.
Windows has a feature where you can "reset allow all files and folders" to the parent folder's folder.
source share