Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Samba folder access

Status
Not open for further replies.
Apr 2, 2005
2
DE
Hello,
I have a new folder in samba programm created (so i added the necessary configuration in smb.conf).
I have to grant rights for an user and a group. The user should have full rights (this means also create directories in this folder. The group should have access to it, but must nt have rights to create a folder under this main folder i've created, but it should have rights to create folders at level 2. i mean:

main folder (samba)---->new folder (only the user)----->new folder (both user and group.

is this possible to do? I searched infos about "force create mode" and "force directory mode2, but it is not very clear to me.
Thanks a lot for your help!
Bogdan
 
You shared folder should have permission 755 or 750
your smb.conf should have
[folder]
comment = Main Folder
path = /some/path
writable = yes
force create code = 0775


"If you always do what you've always done, you will always be where you've always been."
 
Bogdan,
Just completing what rzs0502 said, the owner of the shared folder and subfolders must be user.group (chown -R user.group /my/shared/folder).
The main folder must have permission 750 (rwx for the user, rx for the group and nothing for others). You can do it with chmod 0750 /my/shared/folder.
The subfolders must have permission 770 (rwx for the user, rwx for the group and nothing for others). You can do it with chmod 0770 /my/shared/folder.
The force create mode = 0775 in smb.conf will always give full access to user and group and read only access to everyone else on files created via samba on your share, and may not be what you want.

Best Regards,
Monsores
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top