Thanks for the info Rune, but my problem is slightly different. My trouble is not that users cannot write over a folder, actually the can operaty normally over them; the trouble is that on Windows XP and 2003 clients, windows shows folders inside the shares as read-only (when you go over the folder and tell windows to display its properties, the "read-only" attribute is checked), but they still can operate and write within them. This does not happens on windows 2000 clients.

I find it very strange than no one else has this trouble as I reduced the samba config to the minimum and still have the problem; I'm started to think that could be due to a windows update because we haven't notice it in the past and we have been running something like 20 samba servers for 4 years without any trouble. Any help will be more than welcome.

Thanks a lot in advance.


Rune Tønnesen escribió:
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|/






--
Héctor Sánchez Sanmartín
PlanaTec Software S.L. ** Castellón (Spain)
tlf: +34 964340560 ** fax: +34 964340562

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