[Samba] Questions about sub-folders, access...?

Alberto Moreno portsbsd at gmail.com
Wed Feb 22 07:54:13 GMT 2006


  Hi people, iam testing samba3 on freebsd 5.4, i install samba from ports
with no problems, i have this simple smb.conf file:

[global]
        workgroup = WORKGROUP
        netbios name = FREEBSD
        server string = Samba Server FreeBSD
        security = user
        encrypt passwords = yes
[public]
        comment = %h Shared Public Directory
        path = /opt/test
        force directory mode = 0777
        force create mode = 0777
        force group = nobody
        force user = nobody
        public = yes
        writeable = yes
        read only = no

   My problem right now is that i want to create one folder with the user X
inside this share and give access to  user Y to that sub-folder, them i
create the folder with the user X from windows 2000, smbd create the folder
with this permisions:

root# getfacl test
#file:test
#owner:65534
#group:0
user::rwx
group::rwx
other::rwx

  The owner is nobody like the smb.conf say, the group 0 is wheel, ok here
everybody can access the folder, but what about if i only want to give
access to the owner(X user) and the user Y...?

   Ok, after rading some docs, i do this:

Go to freebsd login with root and change the folder rights:

root# chown X:Y /opt/test/NewFolder
root# chmod 770 /opt/test/NewFolder

   Now user X or Y if try to access the folder from windows 2000 smbd say
"\\Freebsd\public\test is not accessible Access is denied"

   I have been reading the samba 3 by examples book "10.3.3 Share Point
Directory and File Permisions", but didnt find the answer, and the chapter
15 of the samba how-to but they speak about the smb.conf shares, and i want
to apply this to sub-folders i create inside of samba shares...?

   I think this can be done inside the Unix/Linux box with the root user but
i still dont find the way, what i forget...?

   Hope you can help me people, thanks all for your time!!!


More information about the samba mailing list