recursive file permissions does not change new files in same directory
I am at the state where I am getting a bit more knowledgeable about Linux, but there are always some (seemingly) easy questions that I cannot find answers to. Therefore, I still consider myself very much a newbie.
I have a samba server with a number of different users. i have set them up within different groups, and granted some of the groups access to some of the directories.
I am trying to make it so that when a new file is created within a directory, it automatically obtains the file permission status of the directory itself. I would think this is how it would occur automatically, but it doesn't seem to work that way on my server.
This is how I am currently doing it:
In order to grant file read, write, and execute permissions to the owner and group, I first change the group name and owner name, recursively, for the directory:
chown "owner name" -R "directory name"
chgrp "group name" -R "directory name"
then, I change the file permissions, recursively, for the directory:
chmod 770 -R "Directory Name"
I think I am doing this correctly, but at times, when new files are added to the directory, the owner and group names are different for the file, and the permissions look like they are reset to default for this file.
Any suggestions? Thanks.