Chris Smith skrev:
On Friday 11 January 2008, Chris Smith wrote:
instead
of "writable" or "writable".

SHould be "writeable" or "writable".

Sorry I was wrong about that.

Back to the problem

from http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/AccessControls.html

try this


     Users Cannot Write to a Public Share

The following complaint has frequently been voiced on the Samba mailing list: " We are facing some troubles with file/directory permissions. I can log on the domain as admin user (root), and there's 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 the server to *|chgrp -R users *|* and *|chown -R nobody *|* to allow other users to change the file. "

Here is one way the problem can be solved:

  1.

     Go to the top of the directory that is shared.

  2.

     Set the ownership to whatever public user and group you want

     |$ |find `directory_name' -type d -exec chown user:group {}\;
     |$ |find `directory_name' -type d -exec chmod 2775 {}\;
     |$ |find `directory_name' -type f -exec chmod 0775 {}\;
     |$ |find `directory_name' -type f -exec chown user:group {}\;

           Note

     The above will set the |SGID bit| on all directories. Read your
     UNIX/Linux man page on what that does. This ensures that all files
     and directories that are created in the directory tree will be
     owned by the current user and will be owned by the group that owns
     the directory in which it is created.

  3.

     Directory is /|/foodbar|/:

     |$ |*|chown jack:engr /foodbar|*

           Note

     This is the same as doing:

     |$ |*|chown jack /foodbar|*
     |$ |*|chgrp engr /foodbar|*
  4.

     Now type:

     |$ |*|chmod 2775 /foodbar|*
     |$ |*|ls -al /foodbar/..|*
     You should see:

     drwxrwsr-x  2 jack  engr    48 2003-02-04 09:55 foodbar
  5.

     Now type:

     |$ |*|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 jill  engr     0 2007-01-18 19:41 Afile
  6.

     If the user that must have write permission in the directory is
     not a member of the group /engr/ set in the |smb.conf| entry for
     the share:

     /|force group = engr|/




--
Rune Tønnesen
Bedste Hilsner/Best Regards


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Reply via email to