There is a directory I have/var/new_share/KRA2017/Prateek with these contents -rwx------  1 superadmin   superadmin    0 Feb 16 15:14 file1.txt*-rwx------  1 superadmin   superadmin    0 Feb 16 15:14 file2.txt*-rwx------  1 superadmin   superadmin    0 Feb 16 15:15 file3.txt*-rwx------  1 superadmin   superadmin    0 Feb 16 15:15 file4.txt*in /var/new_share/KRA2017/The permission and ownership of directory /var/new_share/KRA2017/Prateek is dr-xrwx--- 2 prateekkaien superadmin 4096 Feb 16 15:15 Prateek/i.e the group owner can only write and user can only read and execute.Whenever a file is being written by user superadminthe user and group owner of the files becomes superadmin as shown here. file1.txt file2.txt file3.txt file4.txt are written by user superadmin.I want the user owner of the files to stick to prateekkaien with the same permissions r-x and the group owner to be superadmin with rwx permission like its parent directory.How is this possible?Basically all I want is for the files to inherit the owner, group, and permissions of the parent directory.
Force new files to inherit specified ownership and permissions
ubuntu;permissions