BUG:Files and directies in share owns the parent directory group in samba

In FreeBSD 8.0

Code:
cd /root/test; id; touch testfile; mkdir testdir; ls -la
> uid=65534(nobody) gid=65534(nobody) groups=65534(nobody)
> drwxr-xr-x   2 nobody  wheel   2 Sep 16 22:10 testdir
> -rw-r--r--   1 nobody  wheel   0 Sep 16 22:10 testfile
New files get the same group as the directory

I need to change this behaviour such that when I create a file, its group must be same as the creating user's group.(i.e similar to sysV way).Is it possible to achieve that in FreeBSD 8.0?

Thanks
poorani
 
Sticky bit not working in sysv way

I set stickybit in a folder using

chmod +t testshare

Code:
ls -ld /testshare/
drwxrwxrwt  2 20017  wheel  512 Apr 27 12:32 /testshare/

Then login as other user and created a file in testshare

Code:
0 -rw-r--r--  1 sri    wheel  0 Apr 27 12:32 t1

The group of the file is wheel only and what i am trying to achieve is to get the group of the user there.
 
Yes, rewrite open() syscall to match your needs, since creat() has been obsoleted and isn't used to create files any more. Or you can patch samba to manually chmod files after they've been copied. There are a lot of ways, if you have time and skills.
 
Back
Top