On Friday 02 June 2006 00:28, Adam Nielsen wrote:
> > So I was supprised when I got ...
> > -rw-rw---- 1 dave dave    0 2006-06-01 21:13 test
> > ie 0660 ? Can anyone tell me where i am going wrong ?
>
> That looks fine to me - try the 'security mask' option as well, it
> could be that your local machine is using the UNIX extensions to set
> extra attributes on files.  The 'security mask' option *may* stop this,
> but disabling UNIX extensions will tell you for sure whether this is
> the problem or not.
>
> Cheers,

...mmm...

OK I looked up security mask, and added it but no go. Here is my modified 
smb.conf in its entirety ...

[EMAIL PROTECTED]:/etc/samba$ cat smb.conf
[global]
    comment = Samba Server

    netbios name = XXXX
    server string = %v on %L

    workgroup = XXXX
    wins support = yes
    security = user

    # Give Samba more authority in elections as master browser
    prefered master = yes
    os level = 255

    # Max permissions for a share
    create mode = 0600
    security mask = 0600

    directory mode = 0700

    # Only on my LAN
    hosts allow = 192.168.0.

    # Various system users and superusers cannot be forged for access
    invalid users = root bin daemon adm sync shutdown halt mail news uucp 
operator

    # Stop symink outside of share tree
    wide links = no

    # Hide .??? files from windows
    hide dot files = yes

    # Allow super users dave and vanda access to all
    # admin users = dave,vanda

    # No oplocks, M$ on system & can be dodgey
    level2 oplocks = no
    oplocks = no

    # Setup logging
    syslog = 0
    # syslog 3 for more thorough logging to syslog
    #syslog = 3
    log level = 2

    log file = /var/log/samba/log.%m
    max log size = 50
    debug timestamp = yes

[common]
    comment = Common Linux Directory
    path = /export/samba/common
    read only = no
    valid users = @smblinux

[windows]
    comment = M$ Directory
    path = /export/samba/windows
    read only = no
    valid users = @smbwindows

[archive]
    comment = Archive Directory
    # Permissions when creating files in this share
    create mode = 0600
    directory mode = 0700
    path = /export/samba/archive
    read only = no
    valid users = @smblinux

Here is my test script .... still got the problem ... makes test with 0666 not 
0600 as I would have expected.

[EMAIL PROTECTED]:/mnt/samba/common$
[EMAIL PROTECTED]:/mnt/samba/common$ touch test
[EMAIL PROTECTED]:/mnt/samba/common$ ls -al
total 16
drwxrwxrwx 1 dave dave 4096 2006-06-03 21:19 .
drwxr-xr-x 5 root root 4096 2006-03-26 00:44 ..
drwxrwxrwx 1 dave dave 4096 2006-05-27 09:19 Films
drwxrwxrwx 1 dave dave 4096 2006-03-27 17:38 music
-rw-rw-rw- 1 dave dave    0 2006-06-03 21:23 test
[EMAIL PROTECTED]:/mnt/samba/common$

mmm ... I bumbed debug up to level 3 and got this ...


[2006/06/03 21:23:19, 3] smbd/process.c:process_smb(1194)
  Transaction 90 of length 84
[2006/06/03 21:23:19, 3] smbd/process.c:switch_message(993)
  switch message SMBtrans2 (pid 5343) conn 0x83cbef8
[2006/06/03 21:23:19, 3] smbd/trans2.c:call_trans2qfilepathinfo(2861)
  call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 263
[2006/06/03 21:23:19, 3] smbd/vfs.c:reduce_name(920)
  reduce_name [test] [/export/samba/common]
[2006/06/03 21:23:19, 3] smbd/vfs.c:reduce_name(1026)
  reduce_name: test reduced to /export/samba/common/test
[2006/06/03 21:23:19, 3] smbd/trans2.c:call_trans2qfilepathinfo(2886)
  call_trans2qfilepathinfo: SMB_VFS_STAT of test failed (No such file or 
directory)
[2006/06/03 21:23:19, 3] smbd/error.c:error_packet(162)
  error packet at smbd/trans2.c(2629) cmd=50 (SMBtrans2) eclass=1 ecode=2
[2006/06/03 21:23:19, 3] smbd/process.c:process_smb(1194)
  Transaction 91 of length 52
[2006/06/03 21:23:19, 3] smbd/process.c:switch_message(993)
  switch message SMBcreate (pid 5343) conn 0x83cbef8
[2006/06/03 21:23:19, 3] smbd/dosmode.c:unix_mode(121)
  unix_mode(test) returning 0600
[2006/06/03 21:23:19, 3] smbd/vfs.c:reduce_name(920)
  reduce_name [test] [/export/samba/common]
[2006/06/03 21:23:19, 3] smbd/vfs.c:reduce_name(1026)
  reduce_name: test reduced to /export/samba/common/test
[2006/06/03 21:23:19, 2] smbd/open.c:open_file(350)
  dave opened file test read=Yes write=Yes (numopen=1)
[2006/06/03 21:23:19, 3] smbd/dosmode.c:unix_mode(121)
  unix_mode(test) returning 0600
[2006/06/03 21:23:19, 2] smbd/reply.c:reply_mknew(1692)
  reply_mknew: file test
[2006/06/03 21:23:19, 3] smbd/reply.c:reply_mknew(1693)
  reply_mknew test fd=19 dmode=0x0
[2006/06/03 21:23:19, 3] smbd/process.c:process_smb(1194)
  Transaction 92 of length 84
[2006/06/03 21:23:19, 3] smbd/process.c:switch_message(993)
  switch message SMBtrans2 (pid 5343) conn 0x83cbef8
[2006/06/03 21:23:19, 3] smbd/trans2.c:call_trans2qfilepathinfo(2861)
  call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 263
[2006/06/03 21:23:19, 3] smbd/vfs.c:reduce_name(920)
  reduce_name [test] [/export/samba/common]
[2006/06/03 21:23:19, 3] smbd/vfs.c:reduce_name(1026)
  reduce_name: test reduced to /export/samba/common/test
[2006/06/03 21:23:19, 3] smbd/trans2.c:call_trans2qfilepathinfo(2913)
  call_trans2qfilepathinfo test (fnum = -1) level=263 call=5 total_data=0
[2006/06/03 21:23:19, 3] smbd/process.c:process_smb(1194)
  Transaction 93 of length 53
[2006/06/03 21:23:19, 3] smbd/process.c:switch_message(993)
  switch message SMBsetattrE (pid 5343) conn 0x83cbef8
[2006/06/03 21:23:19, 3] smbd/reply.c:reply_setattrE(5479)
  reply_setattrE fnum=13387 actime=1149366198 modtime=1149366198
[2006/06/03 21:23:19, 3] smbd/process.c:process_smb(1194)
  Transaction 94 of length 84
[2006/06/03 21:23:19, 3] smbd/process.c:switch_message(993)
  switch message SMBtrans2 (pid 5343) conn 0x83cbef8
[2006/06/03 21:23:19, 3] smbd/trans2.c:call_trans2qfilepathinfo(2861)
  call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 263
[2006/06/03 21:23:19, 3] smbd/vfs.c:reduce_name(920)
  reduce_name [test] [/export/samba/common]
[2006/06/03 21:23:19, 3] smbd/vfs.c:reduce_name(1026)
  reduce_name: test reduced to /export/samba/common/test
[2006/06/03 21:23:19, 3] smbd/trans2.c:call_trans2qfilepathinfo(2913)
  call_trans2qfilepathinfo test (fnum = -1) level=263 call=5 total_data=0
[2006/06/03 21:23:19, 3] smbd/process.c:process_smb(1194)
  Transaction 95 of length 53

Oh and I mounted the share like this ... in an init script ...

# To get round running samba server and access samba on same machine
# and to make the mounting process bombproof
smb_mount() {

declare -i i=0
until cat /etc/mtab | grep //127.0.0.1/$1 &> /dev/null ||  [ $i -ge 10 ]; do

    /bin/mount -t smbfs //127.0.0.1/$1 /mnt/samba/$1 -o 
credentials=/home/dave/.smbpw,uid=dave,gid=dave,fmask=$2,dmask=$3,lfs
    sleep 2
    i=$i+1
done
}

smb_mount common 666 777 &
smb_mount windows 666 777 &
smb_mount archive 600 700 &

Changing the fmask & dmask do act like a mask but as I understood it this is 
secondary to and config in smb.conf

Dave

PS ... mmm .. dumb question - how do I disable UNIX extensions. I googled for 
it but found nothing usefull :)


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