[Samba] Error copying dot-files to samba share
Thomas Fruend
fruend at fhos.de
Wed Nov 23 13:18:15 GMT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
I'm having a problem copying (overwriting) a dot file to a samba share.
When I create a dot file (e.g .project) on a local drive at the XP
machine, I'm able to copy the file to the share ONLY if it does not
exists there. If the file already exists, Samba refuses to overwrite the
file.
The reason of this behavior must have something to do with "hide dot
files = yes" and also "map hidden = yes". Both parameter are enabled in
my smb.conf. If I set one (or both) of these 2 parameters to no,
overwriting of the dot file works.
It also works, when I change the dos attribute of the dot file to
hidden, before copying to the share.
It must have something to do with the check of appropriate rights in the
functions open_match_attributes and open_file_ntcreate in smbd/open.c.
Thanks,
Thomas
My config:
samba 3.0.20b
win xp sp2
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
create mask = 755
[homes]
comment = Homedirectory
invalid users = root
read only = No
map hidden = Yes
browseable = No
log.smbd with debug level 10
[... cut ...]
[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)
[ ... cut ...]
- --
========================================================================
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.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDhGwWYkRwjBKoTa8RAsu9AKDFTBSamnaHDXfUVIOgzC4EhtQIDwCgjHRO
K6th76oRvfIR64NTb6ZaAj0=
=1oqR
-----END PGP SIGNATURE-----
More information about the samba
mailing list