Bug 1130 - samba fails to set proper file mask when used with smbmount
Summary: samba fails to set proper file mask when used with smbmount
Status: RESOLVED DUPLICATE of bug 1920
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.2
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-25 19:49 UTC by Michael Renner
Modified: 2004-10-19 15:12 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Renner 2004-02-25 19:49:57 UTC
Hi!

I'm using samba 3.0.2 on linux 2.4.24 (shouldn't matter, since everything is 
userland) on the server side and smbmount 3.0.2 with linux 2.6.3 (smbfs, not 
cifs) on the client side.

The "interesting" parameters of the share in smb.conf are:

    create mask = 0770
    directory mask = 0770
    group = +verrechnung

The share got mounted with the following options (according to /proc/mounts):

smbfs rw,nosuid,nodev,uid=33,gid=33,file_mode=0755,dir_mode=0755

I see the following effects:

hades:/verrechnung.work# touch bla && sleep 1 && ls -l bla
-rw-r-----    1 www-data 700             0 Feb 26 04:40 bla
hades:/verrechnung.work# echo ":)" > bla && sleep 1 && ls -l bla
-rwxrw----    1 www-data 700             3 Feb 26 04:41 bla*
hades:/verrechnung.work#

Apparently the filemask doesn't get checked/enforced until something writes to 
a file.

The same thing happens to directories, but I can't force them to "correct" 
their umasks.

hades:/verrechnung.work# mkdir foo && sleep 1 && ls -l | grep foo
drwxr-x---    1 www-data 700             0 Feb 26 04:46 foo/
hades:/verrechnung.work# touch foo/bla && mkdir foo/ble && sleep 1 && ls -l | 
grep foo
drwxr-x---    1 www-data 700             0 Feb 26 04:46 foo/
hades:/verrechnung.work#

As far as I can tell there aren't such problems with windows/macos clients (2k, 
xp, macos x).
Comment 1 Björn Jacke 2004-10-19 15:12:18 UTC

*** This bug has been marked as a duplicate of 1920 ***