From: John Terpstra Date: Tue, 20 May 2003 06:24:48 +0000 (+0000) Subject: More edits - added example. X-Git-Url: http://git.samba.org/samba.git/?p=kai%2Fsamba.git;a=commitdiff_plain;h=858a74d0e685cd92fa2ed66407ff5c51d34517b2 More edits - added example. (This used to be commit 3a5db768c2c577355470d718d1c5be93ed637f0e) --- diff --git a/docs/docbook/projdoc/AccessControls.xml b/docs/docbook/projdoc/AccessControls.xml index 95eb6cebba9..38c3475d34d 100644 --- a/docs/docbook/projdoc/AccessControls.xml +++ b/docs/docbook/projdoc/AccessControls.xml @@ -1090,9 +1090,109 @@ Before using any of the following options please refer to the man page for &smb. Common Errors -Stuff from mailing lists here +File, Directory and Share access problems are very common on the mailing list. The following +are examples taken from the mailing list in recent times. + + + Users can not write to a public share + + + We are facing some troubles with file / directory permissions. I can log on the domain as admin user(root), + and theres a public share, on which everyone needs to have permission to create / modify files, but only + root can change the file, no one else can. We need to constantly go to server to + chgrp -R users * and chown -R nobody * to allow others users to change the file. + + + + There are many ways to solve this problem, here are a few hints: + + + + Example Solution: + + + Go to the top of the directory that is shared + + + + + + Set the ownership to what ever public owner and group you want + + find 'directory_name' -type d -exec chown user.group {}\; + find 'directory_name' -type d -exec chmod 6775 'directory_name' + find 'directory_name' -type f -exec chmod 0775 {} \; + find 'directory_name' -type f -exec chown user.group {}\; + + + + + Note: The above will set the 'sticky bit' on all directories. Read your + Unix/Linux man page on what that does. It causes the OS to assign to all + files created in the directories the ownership of the directory. + + + + + Directory is: /foodbar + chown jack.engr /foodbar + + Note: This is the same as doing: + chown jack /foodbar + chgrp engr /foodbar + + Now do: + chmod 6775 /foodbar + ls -al /foodbar/.. + + You should see: + drwsrwsr-x 2 jack engr 48 2003-02-04 09:55 foodbar + + Now do: + su - jill + cd /foodbar + touch Afile + ls -al + + + + + You should see that the file 'Afile' created by Jill will have ownership + and permissions of Jack, as follows: + + -rw-r--r-- 1 jack engr 0 2003-02-04 09:57 Afile + + + + + + + Now in your smb.conf for the share add: + + force create mode = 0775 + force direcrtory mode = 6775 + + + + + Note: The above are only needed IF your users are NOT members of the group + you have used. ie: Within the OS do not have write permission on the directory. + + + + An alternative is to set in the smb.conf entry for the share: + + force user = jack + force group = engr + + + + + + +