Hello all! I'm in need of some assistance and advice concerning Samba. I am setting up a Samba server for Windows users. Each Windows users will have their own home folder (ex: /home/matt) I also want all the users to have access to a common public folder. I've achieved this with mixed success and would like some comments / suggestions / advice, etc. This is my first attempt at this and I'm wondering if there is a better way so please leave your comments! Objectives... -> To provide server storage for several Windows users on a Suse 8.1 Linux system running Samba -> All users will have access to a public folder for shared files -> All users have full read / write / execute permissions in the public folder. What I did... -> I setup all users on the linux system creating their home folders (ex: /home/matt, /home/bob, etc.) -> I setup a user public creating /home/public. -> All users are in the users group. -> I placed a link to /home/public within each user's folder. I hoped this would give access when the user's home folder (ex: /home/matt) is mapped to a drive (ex: K:) users will see a K:/public folder. -> I added the following section to smb.conf... [public] path = /home/public read only = no writable = yes guest ok = yes browseable = yes public = yes create mask = 0777 directory mask = 0777 force create mode = 0774 force directory mode = 0774 Results... -> If the public folder is accessed using Network Neighborhood all works as intended. -> If the public folder is accessed through the link within each user's home folder then I do not get the full permission on files created within the public folder. The files end up belonging to the owner. The group has read access only. Why is this? ->If I map the pubic folder to drive L: this also works fine. It appears the link to the public folder is not the best idea. Is this the best way to do this? I would welcome any suggestions. Thanks, Matt
On Friday 21 February 2003 16:44, Matt Stamm wrote:
-> All users will have access to a public folder for shared files
-> All users have full read / write / execute permissions in the public folder.
I have something exactly like this, actually.
-> If the public folder is accessed through the link within each user's home folder then I do not get the full permission on files created within the public folder. The files end up belonging to the owner. The group has read access only. Why is this?
->If I map the pubic folder to drive L: this also works fine.
This is actually the expected behavior. Samba can control the permissions of files created for a share. By creating a symlink in a user's directory (e.g., /home/foo/public -> /home/public), you are going -around- Samba. The user simply changes to this directory and creates a file as if the directory belonged to the current user. Remember that that symlink is just that--a symlink. Samba can set the permissions for a share, but not a symlink. So this is why mapping the public share to another drive letter works: Samba is controlling the permissions. For a symlinked directory inside a user's home directory, the link is just another regular directory. [Perhaps I'm not explaining this well enough. It's Friday night, after all.]
It appears the link to the public folder is not the best idea. Is this the best way to do this? I would welcome any suggestions.
I'm sure there are many ways to do this. Brainstorm follows: 1. Create a Windows shortcut inside each user's home directory to \\samba\public . 2. Map \\samba\public to some drive letter (you need this) and create a Windows shortcut inside each user's home directory to that drive letter. This is what comes to me. Perhaps someone else has a better idea.
participants (2)
-
Karol Pietrzak
-
Matt Stamm