[Samba] Access denied with hide dot file AND map hidden enabled

Thomas Fruend fruend at fhos.de
Mon Nov 14 14:50:27 GMT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I experienced a problem with Eclipse, but I was able to track it down to
the following behavior:

My config:
Samba Server 3.0.20b exporting Homes
Win XP SP2 Clients with mounted homedir as drive z:

1) I created a textfile named .project on the local drive of the xp
   machine.
2) With Windows Explorer I copied the file to the samba share z:
   - the file was created.
3) I copied the file again to z:
   - windows asked "sure to replace?"
   - if I answered yes, I get the acces denied message

This happens when setting 'hide dot files = yes' AND 'map hidden = yes'
in smb.conf. If I set one parameter to 'no' I'm able to copy the
.project-file. But that is not what I want. :-)

Any ideas?
Thomas Fruend


Here is a snippet of the log.smbd set to debuglevel 10:
- ---------------------------------------------------------------------
[2005/11/14 13:08:21, 10, pid=25540, effective(2004, 1), real(0, 0)]
lib/util.c:dump_data(2053)
  [000] 00 5C 00 2E 00 70 00 72  00 6F 00 6A 00 65 00 63  .\...p.r .o.j.e.c
  [010] 00 74 00 00 00                                    .t...
[2005/11/14 13:08:21, 3, pid=25540, effective(2004, 1), real(0, 0)]
smbd/process.c:switch_message(900)
  switch message SMBntcreateX (pid 25540) conn 0x2de308
[2005/11/14 13:08:21, 4, pid=25540, effective(2004, 1), real(0, 0)]
smbd/uid.c:change_to_user(217)
  change_to_user: Skipping user change - already user
[2005/11/14 13:08:21, 10, pid=25540, effective(2004, 1), real(0, 0)]
smbd/nttrans.c:reply_ntcreate_and_X(506)
  reply_ntcreateX: flags = 0x16, access_mask = 0x30196 file_attributes =
0x20, share_access = 0x3, create_disposition = 0x5 create_options = 0x44
root_dir_fid = 0x0
[2005/11/14 13:08:21, 5, pid=25540, effective(2004, 1), real(0, 0)]
smbd/filename.c:unix_convert(108)
  unix_convert called on file ".project"
[2005/11/14 13:08:21, 10, pid=25540, effective(2004, 1), real(0, 0)]
smbd/statcache.c:stat_cache_lookup(248)
  stat_cache_lookup: lookup succeeded for name [.PROJECT] -> [.project]
[2005/11/14 13:08:21, 3, pid=25540, effective(2004, 1), real(0, 0)]
smbd/dosmode.c:unix_mode(121)
  unix_mode(.project) returning 0744
[2005/11/14 13:08:21, 10, pid=25540, effective(2004, 1), real(0, 0)]
smbd/open.c:open_file_ntcreate(1236)
  open_file_ntcreate: fname=.project, dos_attrs=0x20 access_mask=0x30196
share_access=0x3 create_disposition = 0x5 create_options=0x44 unix
mode=0744 oplock_request=3
[2005/11/14 13:08:21, 8, pid=25540, effective(2004, 1), real(0, 0)]
smbd/dosmode.c:dos_mode(294)
  dos_mode: .project
[2005/11/14 13:08:21, 8, pid=25540, effective(2004, 1), real(0, 0)]
smbd/dosmode.c:dos_mode_from_sbuf(162)
  dos_mode_from_sbuf returning a
[2005/11/14 13:08:21, 8, pid=25540, effective(2004, 1), real(0, 0)]
smbd/dosmode.c:dos_mode(328)
  dos_mode returning ha
[2005/11/14 13:08:21, 10, pid=25540, effective(2004, 1), real(0, 0)]
smbd/open.c:open_match_attributes(949)
  open_match_attributes: file .project old_dos_attr = 0x22,
existing_unx_mode = 0100744, new_dos_attr = 0x20 returned_unx_mode = 00
[2005/11/14 13:08:21, 5, pid=25540, effective(2004, 1), real(0, 0)]
smbd/open.c:open_file_ntcreate(1391)
  open_file_ntcreate: attributes missmatch for file .project (22 20)
(0100744, 0744)
[2005/11/14 13:08:21, 10, pid=25540, effective(2004, 1), real(0, 0)]
smbd/trans2.c:set_bad_path_error(2583)
  set_bad_path_error: err = 13 bad_path = 0
[2005/11/14 13:08:21, 3, pid=25540, effective(2004, 1), real(0, 0)]
smbd/error.c:unix_error_packet(91)
  unix_error_packet: error string = Permission denied
[2005/11/14 13:08:21, 3, pid=25540, effective(2004, 1), real(0, 0)]
smbd/error.c:error_packet(147)
  error packet at smbd/trans2.c(2592) cmd=162 (SMBntcreateX)
NT_STATUS_ACCESS_DENIED
[2005/11/14 13:08:21, 5, pid=25540, effective(2004, 1), real(0, 0)]
lib/util.c:show_msg(454)
[2005/11/14 13:08:21, 5, pid=25540, effective(2004, 1), real(0, 0)]
lib/util.c:show_msg(464)
- -----------------------------------------------------------------------

smb.conf
[global]
        workgroup = EDVSZ
        netbios name = SMBSRV3
        server string = test
        bind interfaces only = Yes
        security = DOMAIN
        password server = SMBSRV1
        smb passwd file = /usr/samba/private/smbpasswd
        log level = 10
        max log size = 100000
        debug pid = Yes
        debug uid = Yes
        time server = Yes
        deadtime = 5
        os level = 0
        preferred master = No
        local master = No
        domain master = No
        oplock break wait time = 100
        case sensitive = No
        dos filetime resolution = Yes

[homes]
        comment = Homedirectory
        invalid users = root
        read only = No
        map hidden = Yes
        browseable = No


- --
========================================================================
Dipl.-Ing. Thomas Fründ  Fachhochschule Osnabrück
EDV-Schulungszentrum     Fakultät Ingenieurwissenschaften und Informatik
Tel: +49-541-969-3021    Albrechtstr. 30, 49076 Osnabrück, Raum AA0101
Fax: +49-541-969-13021   http://www.edvsz.fh-osnabrueck.de/fruend
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-nr1 (Windows XP)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDeKQzYkRwjBKoTa8RAsR5AJ9RiBFFg7CxqbmTzqBMpBg09PmeVACfeMS0
udTxfPJj5GmYQmXaJ8m5LH4=
=VqUI
-----END PGP SIGNATURE-----


More information about the samba mailing list