Hi, i wan to force the rights of a file that is created by a user at rwx rwx --- in the shared folder (samba 3.10) here's the section in smb.conf file of the share [compta] comment = fichiers du service comptable path = /home/services/compta public = yes writeable = yes read only = no force create mode = 0034 valid users = @compta # le groupe superviseur a tous les droits sur ce partage admin users = @superviseur browseable = no i put force create mode = 0034, because i read that samba will make a 'OR' bit operation on it The default creat mask is 0744 so when i create a file the rights are rwx r-- r--. Ok But when i put force create mode = 0034 i get rwx rwx r-- instead of rwx rwx --- !! Where is the mistake? Second question : What instruction do i have to add in the [compta] section so that all the files are created with the right group (for now they are created with 'Domain Users' group) Thanks for ant help
This is an update. I found for question 2. Just put force group = <group name> or set the setgid bit on the root directory of the share But i still can't solve my first problem. What do i have to do so that each file that a user creates has the following rights rwx rwx --- ? Were is the trick ? i read about force mask , creat mask ... in man smb.conf but i really don't understand....> > i wan to force the rights of a file that is created by a user at rwx > rwx --- in the shared folder (samba 3.10) > > here's the section in smb.conf file of the share > [compta] > comment = fichiers du service comptable > path = /home/services/compta > public = yes > writeable = yes > read only = no > force create mode = 0034 > valid users = @compta > # le groupe superviseur a tous les droits sur ce partage > admin users = @superviseur > browseable = no > > i put force create mode = 0034, because i read that samba will make a > 'OR' bit operation on it > The default creat mask is 0744 so when i create a file the rights are > rwx r-- r--. > Ok > But when i put force create mode = 0034 i get rwx rwx r-- instead > of rwx rwx --- !! > Where is the mistake? > > Second question : > What instruction do i have to add in the [compta] section so that all > the files are created with the right group (for now they are created > with 'Domain Users' group) > > Thanks for ant help >-- -------------------------------------------------------------------------------------------- Patrick DUBAU IUFM d'Alsace - Service Informatique : "Parfois d?truire, souvent construire, toujours Servir" 200 avenue de Colmar 67100 STRASBOURG T?l?phone: 03.88.40.79.76 ----------------------------------------------------------------------------------------------
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Patrick DUBAU wrote: | But when i put force create mode = 0034 i get rwx rwx r-- | instead of rwx rwx --- !! Where is the mistake? The force create mode is a bitwise OR So you are including the o+r bit. if you want all files to be rwx rwx ---, the just set the force create mode to be 0770. cheers, jerry ====================================================================Alleviating the pain of Windows(tm) ------- http://www.samba.org GnuPG Key ----- http://www.plainjoe.org/gpg_public.asc "I never saved anything for the swim back." Ethan Hawk in Gattaca -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFB49hgIR7qMdg1EfYRArIZAKDaRlFj+5P2zGdnBsvn7qVQgxsbNACfVJFm S7qe1Uzuz7CxpG5mxEtTtSc=0k9A -----END PGP SIGNATURE-----