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

Torsten Geile zuhause at tippex.net
Wed Feb 22 13:39:48 GMT 2006


Hi,


Am Wed, 22 Feb 2006 09:00:21 +0100 schrieb Alberto Moreno:

>   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:

what do you mean when saying "with the user x inside this share"?

> 
> 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...?

so why creating force user 0777?

best method would be creating a group which is supposed to have access 
to that specific folder, placing all users into that group and then 
setting the rights.for example create group test, make user x and user y 
be a member of the group. then:

setfacl -R -m g:test:rwx test

and if you want this group to have access to all files and folders 
createt later on in this folder then in adition

setfacl -d -R -m g:test:rwx test
> 
>    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!!!

hth

torsten



More information about the samba mailing list