Hello, I have two little problems with samba: 1st. Samba is not setting the sticky bit anymore !!! I have a share that look like this: [publico] comment = Arquivos publicos path = /home/publicos public = yes writable = yes force directory mode = 1777 create mask = 0664 With samba 1.9.x it was ok, the directories was being created with the correct permission (drwxrwxrwt), but since I instaled Samba 2.0.3 I couldn't make it work again, every new directory is created with drwxrwxrwx, I've tried nearly every possible configuration unsuccesfully. I've upgraded to 2.0.5a too, which couldn't solve my problem :( What is going wrong ? 2nd. Samba is not showing the correct free space !!! I have quota enabled (about 50 Mb for each user) and with Samba 2.0.3 when a user ask (from a windows client) for the properties of a mapped share, the user see the correct information (Capacity, free space, etc) related with his, or her, quota; but with Samba 2.0.5a what the user see is: Capacity: 1.99GB, Free space: 1.99GB, Used: 0 I've compiled both versions the same way, with the same configuration parameters, I've tried with and without the experimental quota suport, etc What I'm doing wrong ? By the way, my system is a Linux box (2.2.12), libc5 (slack). Thanks in advance. - Cristiano =================================================== /^\__/\ /' , : "Conhecimento nao e' crime !" ~ < o o / , \ cristmon@ufba.br ( `- ..__" Estudante de Ciencias da Computacao - UFBa ' /' http://www.netforward.com/thepentagon/?cristmon PGP public key available by WWW and on request. ================================================== /"\ \ /? CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X?? ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \
Cristiano Reis Monteiro wrote:> Samba is not setting the sticky bit anymore !!! > > I have a share that look like this: > > [publico] > comment = Arquivos publicos > path = /home/publicos > public = yes > writable = yes > force directory mode = 1777 > create mask = 0664 > > With samba 1.9.x it was ok, the directories was being created with the > correct permission (drwxrwxrwt), but since I instaled Samba 2.0.3 I > couldn't make it work again, every new directory is created with > drwxrwxrwx, I've tried nearly every possible configuration unsuccesfully. > I've upgraded to 2.0.5a too, which couldn't solve my problem :( What is > going wrong ?Ok, I've taken a look at this and the Samba code looks correct. I debugged the code path creating a directory and it is indeed calling mkdir(name, 01777). The fun part comes here in the IRIX man page for mkdir. mkdir creates a new directory with the name path. The mode of the new directory is initialized from mode (see chmod(2) for values of mode]. The protection part of mode is modified by the process's mode mask (see umask(2)). *****The S_ISGID, S_ISUID, and S_ISVTX bits are silently deleted from mode.****** <--- My emphasis ! I then looked in the POSIX spec for mkdir() which states : "The file permission bits of the mode argument are modified by the file creation mask of the process (see 5.3.3). When bits in mode other than the file permission bits are set, the meaning of these additional bits is implementation defined." So IRIX is conformant and other POSIX OSen probably do the same thing. I will need to add a chown call after the mkdir in order to ensure the bits get set correctly. Expect this after I get back from vacation. Regards, Jeremy Allison, Samba Team. -- -------------------------------------------------------- Buying an operating system without source is like buying a self-assembly Space Shuttle with no instructions. --------------------------------------------------------