LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   recursive file permissions does not change new files in same directory (https://www.linuxquestions.org/questions/linux-newbie-8/recursive-file-permissions-does-not-change-new-files-in-same-directory-154772/)

PAB 03-07-2004 08:13 PM

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.

PAB

ranger_nemo 03-07-2004 08:27 PM

You'll want to set-up Samba with defaults for the permissions for the shared directories. Of course, I don't remember how to do this off the top of my head. I think it's "create mask" or some-such, and is set in the [share] description.

PAB 03-08-2004 12:27 PM

thanks a lot. i looked under mask in my samba book and found exactly what i am looking for. it helps to know the terminology!

pab


All times are GMT -5. The time now is 03:12 PM.