The permissions set on files is controlled by the user writing that file, not by any sort of inheritance.
When an application writes files, it must do so as a user (usually a dedicated user, such as "www" or similar). Users have set defaults for what we call "umask" in /etc/profile
and possibly within /etc/profile.d/
. Within those files are global settings for all users.
These can be overridden per-user by placing a file named .profile
within that user's home directory with the following line (adjusted to taste depending on your requirements):
umask 022
Where setting default permission modes per-user isn't practical, you can accomplish permissions mode inheritance with the use of ACLs. A "default acl" applied to a directory will define a default permission set for every file or folder created within that directory with a default ACL set.
For example, you could can display ACLs on a directory like so:
getfacl <directory>
And if you want to change the default ACL to implement user-independent permission inheritance, you can change the default ACL. In this command, the "-m" switch is to enable modifications, and the "d:" entry specified that the following ACL should be the inheritable "default":
setfacl -m d:o:rx /share
In the above case, one would be setting the /share directory to allow "others" to read and execute everything that is created within that directory. Existing files are not affected by this rule, and would need to be updated if necessary.
More information on working with ACLs can be found here.