My www directory is owned by "apache" and the group is "todd" and the permissions are 775. My Windows computers use Samba and they log into Linux with "todd". Under the www directory there are various directories which may have a group belonging to a user e.g. "viewpoint". Using this example, there is a directory under www (acutally called httpd), "viewpoint" that is owned by "apache" and is a member of the "viewpoint" group. "todd" is also a member of the "viewpoint" group. Now this is the problem I do not know how to correct: if "todd" using Samba creates a directory in "viewpoint", the owner and group is "todd" with 755 permissions. Now if the "viewpoint" user tries to write to the directory, he does not have adequate permissions. Maybe I have not setup the owners and groups correctly. maybe there is something I need to do with how Samba interacts with the server. Any suggestions will be appreciated... Todd -- Ariste Software 2200 D Street Ext Petaluma, CA 94952 (707) 773-4523
I think the 'force user' and 'force group' diretives are the right answer for you question. Set this on your samba share and set the user and group you want to maintain the owner and group permissions. On 10/1/07, Todd Cary <todd at aristesoftware.com> wrote:> My www directory is owned by "apache" and the group is "todd" and the > permissions are 775. > > My Windows computers use Samba and they log into Linux with "todd". > > Under the www directory there are various directories which may have a > group belonging to a user e.g. "viewpoint". Using this example, there > is a directory under www (acutally called httpd), "viewpoint" that is > owned by "apache" and is a member of the "viewpoint" group. "todd" is > also a member of the "viewpoint" group. > > Now this is the problem I do not know how to correct: if "todd" using > Samba creates a directory in "viewpoint", the owner and group is "todd" > with 755 permissions. Now if the "viewpoint" user tries to write to the > directory, he does not have adequate permissions. > > Maybe I have not setup the owners and groups correctly. maybe there is > something I need to do with how Samba interacts with the server. > > Any suggestions will be appreciated... > > Todd > > -- > Ariste Software > 2200 D Street Ext > Petaluma, CA 94952 > (707) 773-4523 > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >
Todd, On 10/1/07, Todd Cary <todd at aristesoftware.com> wrote:> My www directory is owned by "apache" and the group is "todd" and the > permissions are 775. > > My Windows computers use Samba and they log into Linux with "todd". > > Under the www directory there are various directories which may have a > group belonging to a user e.g. "viewpoint". Using this example, there > is a directory under www (acutally called httpd), "viewpoint" that is > owned by "apache" and is a member of the "viewpoint" group. "todd" is > also a member of the "viewpoint" group. > > Now this is the problem I do not know how to correct: if "todd" using > Samba creates a directory in "viewpoint", the owner and group is "todd" > with 755 permissions. Now if the "viewpoint" user tries to write to the > directory, he does not have adequate permissions. > > Maybe I have not setup the owners and groups correctly. maybe there is > something I need to do with how Samba interacts with the server.When files/folders are created on a UNIX/Linux system, all permission bits set minus your umask, which is usually 022. In your case, 777 - 022 = 755. Just type umask at a command prompt to see your umask value. umask is set during system login and inherited during process creation. You could change your system wide login's umask setting from 022 to 002 which would change the default to 755 for all new files and folders created on the system. A better alternate for you might be to specify an override in your samba configuration for the specific share, I've found these settings work best: [Example] path = /home/Example create mask = 0775 force create mode = 0775 directory mask = 0775 force directory mode = 0775 ... Brett
Thank you all for the store of knowledge. I do have a follow up question about Rick's suggestion concerning ownership of the "Apache" directories. What is a good alternative? If they are "root", can Apache access them? Is that even good? Suggestions welcomed... Todd Todd Cary wrote:> My www directory is owned by "apache" and the group is "todd" and the > permissions are 775. > > My Windows computers use Samba and they log into Linux with "todd". > > Under the www directory there are various directories which may have a > group belonging to a user e.g. "viewpoint". Using this example, there > is a directory under www (acutally called httpd), "viewpoint" that is > owned by "apache" and is a member of the "viewpoint" group. "todd" is > also a member of the "viewpoint" group. > > Now this is the problem I do not know how to correct: if "todd" using > Samba creates a directory in "viewpoint", the owner and group is > "todd" with 755 permissions. Now if the "viewpoint" user tries to > write to the directory, he does not have adequate permissions. > > Maybe I have not setup the owners and groups correctly. maybe there > is something I need to do with how Samba interacts with the server. > > Any suggestions will be appreciated... > > Todd >-- Ariste Software 2200 D Street Ext Petaluma, CA 94952 (707) 773-4523
Dear salam, Please make sure that, user viewpoint must be a member of that group which user todd belongs (because todd is able to write in the directory). I suppose permissions donot need to be checked, beacuse todd is able to write. OR, the files permissions should be 664 Regards, Umair Shakil ETD On 10/1/07, Todd Cary <todd at aristesoftware.com> wrote:> > My www directory is owned by "apache" and the group is "todd" and the > permissions are 775. > > My Windows computers use Samba and they log into Linux with "todd". > > Under the www directory there are various directories which may have a > group belonging to a user e.g. "viewpoint". Using this example, there > is a directory under www (acutally called httpd), "viewpoint" that is > owned by "apache" and is a member of the "viewpoint" group. "todd" is > also a member of the "viewpoint" group. > > Now this is the problem I do not know how to correct: if "todd" using > Samba creates a directory in "viewpoint", the owner and group is "todd" > with 755 permissions. Now if the "viewpoint" user tries to write to the > directory, he does not have adequate permissions. > > Maybe I have not setup the owners and groups correctly. maybe there is > something I need to do with how Samba interacts with the server. > > Any suggestions will be appreciated... > > Todd > > -- > Ariste Software > 2200 D Street Ext > Petaluma, CA 94952 > (707) 773-4523 > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20071002/4403ee97/attachment-0005.html>