[Samba] Update 4.10.2 to 4.10.4: Cant create files in subdirectorie anymore

Sascha Brutscher sascha.brutscher at medicomp.de
Fri Jun 14 16:36:01 UTC 2019


Hi everyone,

since i upgraded from 4.10.2 to 4.10.4 i can't write into subdirectories
of a share anymore.
This worked perfectly fine before i upgraded and also works again if i
downgrade. 
I think either something is fishy with the 'filename_convert_internal'
function of ".../source3/smbd/filename.c"
or my configuration needs to be adjusted for 4.10.4. I tried several
changes (disable unix extrensions, vfs_xattr options, reconfigured
GlusterFS volume and many more)
in my config but none of the changes made me able to use the shares like
before. I even tried "rwx for all" out of desperation. 

I'd be happy if i could find a solution here.
I only serve files to windows 10 clients, so if the solution includes
deactivating services used by unix im fine with that! 

I just really need everyone to be able to write into subdirectories (on
which they have permissions)(Windows ACLs of course) again couse my Setup
looks a bit like this:
-> Adminshare (rootshare for administrative use)
###--> Users (rootshare mounted on clients)
######---> UserDir (only readable by owner)
#########----> UsersFiles
###--> Departments (rootshare mounted on clients)
######---> Department (only readably by department)
#########----> DepartmentsFiles

###### Example: #####
## ON UNIX SYSTEM: ##
#####################
[root at FS2]# smbclient \\\\cluster-01\\john -U administrator
Enter SAMDOM\administrator's password:
smb: \> mkdir subfolder
smb: \> cd subfolder\
smb: \subfolder\> mkdir subsubfolder
NT_STATUS_INVALID_PARAMETER making remote directory
\subfolder\subsubfolder

###################
## ON WINDOWS10: ##
###################
Connect to \\cluster-01\john\
Create dir "winsubdir"
ChDir to "winsubdir"
Create File/Dir
Error: The File"" is too large for the destination file system.
ChDir to "john"
Create Dir "winsubsubdir"
move Dir "winsubsubdir" into "winsubdir"
Error: The File "winsubsubdir" is too large for the destination file
system.

################
# General Info #
################
OS: CentOS 7.6 (1810)
Samba Version: 4.10.4-4.el7 (SERNET-Packages)
CTDB Version: 4.10.4-4.el7 (SERNET-Packages)
Filesystem: GlusterFS 5.6-1.el7

################
### smb.conf ###
### PLEASE NOTE: The options regarding the case sensitivity arent usually
activated. Normally i leave them on default
### but since i troubleshooted this error for 2 days now i changed the
conf several times
[global]
clustering = Yes
log level = 10
log file = /glusterfs/log.samba
netbios name = CLUSTER-01
realm = SAMDOM.XYZ
registry shares = Yes
security = ADS
winbind enum groups = Yes
winbind enum users = Yes
winbind refresh tickets = Yes
winbind use default domain = Yes
workgroup = SAMDOM
idmap config samdom:range = 1000000-1999999
idmap config samdom:backend = rid
idmap config *:range = 10000-19999
idmap config * : backend = tdb
case sensitive = No
map acl inherit = Yes
preserve case = No
short preserve case = No
vfs objects = acl_xattr

[john]
#admin users = samdom\administrator
comment = admin share
kernel share modes = No
path = /top1/share
read only = No
vfs objects = glusterfs
glusterfs:loglevel = 1
glusterfs:logfile = /glusterfs/glusterfs-gv0.log
glusterfs:volume = gv0

#####################
#### permissions ####
#####################
[root at Cluster1-FS2 ~]# ls -la /glusterfs/top1/share/
drwxrwx---+ 2 administrator domain admins 4096 14. Jun 16:43 sub_dir

[root at Cluster1-FS2 ~]# getfacl glusterfs/top1/share/sub_dir
# file: glusterfs/top1/share/sub_dir
# owner: administrator
# group: domain\040admins
user::rwx
user:administrator:rwx
user:1000512:rwx
user:1000513:rwx
group::rwx
group:domain\040admins:rwx
group:domain\040users:rwx
mask::rwx
other::---
default:user::rwx
default:user:1000512:rwx
default:user:1000513:rwx
default:group::---
default:group:domain\040admins:rwx
default:group:domain\040users:rwx
default:mask::rwx
default:other::---

######################################
# LOGS(grep -ia2 dirName)   
# Tried to make this easy readable.
# Includes grep on "sub_dir" as well as "sub_sub_dir"
# If you need the plain level10 logs, let me know
######################################
481(unix_convert):                       unix_convert called on file
"sub_dir"
245(stat_cache_lookup):             stat_cache_lookup: lookup failed for
name [SUB_DIR]
682(unix_convert):                       unix_convert begin: name =
sub_dir, dirpath = ., start = sub_dir
418(is_mangled):                       is_mangled sub_dir ?
357(is_mangled_component):             is_mangled_component sub_dir (len
7) ?
418(is_mangled):                       is_mangled sub_dir ?
357(is_mangled_component):             is_mangled_component sub_dir (len
7) ?
418(is_mangled):                       is_mangled sub_dir ?
357(is_mangled_component):             is_mangled_component sub_dir (len
7) ?
1123(unix_convert):                   New file sub_dir
5625(create_file_default):             create_file_default: create_file:
access_mask = 0x80 file_attributes = 0x10, share_access = 0x3,
create_disposition = 0x2 create_options = 0x1 oplock_request = 0x0
private_flags = 0x0 root_dir_fid = 0x0, ea_list = (nil), sd = (nil), fname
= sub_dir
5075(create_file_unixpath):         create_file_unixpath:
create_file_unixpath: access_mask = 0x80 file_attributes = 0x10,
share_access = 0x3, create_disposition = 0x2 create_options = 0x1
oplock_request = 0x0 private_flags = 0x0 ea_list = (nil), sd = (nil),
fname = sub_dir
4005(open_directory):                   open_directory: opening directory
sub_dir, access_mask = 0x80, share_access = 0x3 create_options = 0x1,
create_disposition = 0x2, file_attributes = 0x10
208(unix_mode):                       unix_mode: unix_mode(sub_dir)
returning 0755
283(check_parent_access):             check_parent_access: root override
on sub_dir. Granting 0x4
923(file_set_dosmode):                   file_set_dosmode: setting dos
mode 0x10 on file sub_dir
457(set_ea_dos_attribute):             set_ea_dos_attributes: set
attribute 0x10, btime = Fri Jun 14 16:43:38 2019on file sub_dir
541(set_ea_dos_attribute):             set_ea_dos_attribute: set EA 0x10
on file sub_dir
217(notify_trigger):                   notify_trigger called action=0x1,
filter=0x2, dir=/top1/share, name=sub_dir
1436(messaging_dgm_send):             messaging_dgm_send: Sending message
to 6123
allocated file structure fnum 3330821925 (1 used):         
747(file_name_hash):                   file_name_hash: /top1/share/sub_dir
hash 0xe1a55ab3
4213(open_directory):                   Not opening Directory sub_dir
130(dbwrap_lock_order_lock):         bwrap_lock_order_lock: check lock
order 1 for locking.tdb
--
servicepath:                        '/top1/share'
base_name:                            *
base_name:                            'sub_dir'
stream_name:                        NULL
num_share_modes                     0x00000001 (1):         
extid:                                0x0000000000000000 (0):         
157(share_mode_memcache_delete):    share_mode_memcache_delete: deleting
entry for file sub_dir seq cf24aa6df5275713 key
164f73fa:b67c55175d5c4291:0
159(dbwrap_lock_order_unlock):         dbwrap_lock_order_unlock: release
lock order 1 for locking.tdb
--
Unlocking db 2048514125 key FA734F16000000009142
171(share_mode_memcache_store):     share_mode_memcache_store: stored
entry for file sub_dir seq cf24aa6df5275714 key
164f73fa:b67c55175d5c4291:0
668(get_nt_acl_common):             get_nt_acl_common: name=.
--
trustee                              
 S-1-5-21-2698934694-3277079463-324590320-513
4634(inherit_new_acl):                   inherit_new_acl: parent acl for
sub_dir is:
022(ndr_print_debug):                    parent_desc: struct
security_descriptor
--
se_create_child_secdesc():           
 S-1-5-21-2698934694-3277079463-324590320-513:0/0x07/0x001f01ff  inherited
as S-1-5-21-2698934694-3277079463-324590320-513:0/0x10/0x001f01ff
4762(inherit_new_acl):                   inherit_new_acl: child acl for
sub_dir is:
422(ndr_print_debug):                  psd: struct security_descriptor
--
trustee                              
 S-1-5-21-2698934694-3277079463-324590320-513
930(fset_nt_acl_common):             fset_nt_acl_common: incoming sd for
file sub_dir
422(ndr_print_debug):                 discard_const_p(struct
security_descriptor, orig_psd): struct security_descriptor
--        
trustee                              
 S-1-5-21-2698934694-3277079463-324590320-513
668(get_nt_acl_common):             get_nt_acl_common: name=sub_dir
216(push_sec_ctx):                      push_sec_ctx(0, 1000512) :
sec_ctx_stack_ndx = 1
--
0id_to_sid: GID 1000513 ->           
 S-1-5-21-2698934694-3277079463-324590320-513 from cache
793(get_nt_acl_common):             get_nt_acl_common: returning acl for
sub_dir is:
422(ndr_print_debug):                 psd: struct security_descriptor
--    
xid_to_sid: GID 1000513 ->           
 S-1-5-21-2698934694-3277079463-324590320-513 from cache
1054(fset_nt_acl_common):             fset_nt_acl_common: storing xattr sd
for file sub_dir based on system ACL
422(ndr_print_debug):                 discard_const_p(struct
security_descriptor, psd): struct security_descriptor
--
create_file: info=2
734(dos_mode):                         dos_mode: sub_dir
285(parse_dos_attribute_blob):         parse_dos_attribute_blob: sub_dir
attr = 0x10
325(parse_dos_attribute_blob):         parse_dos_attribute_blob: file
sub_dir case 3 set btime Fri Jun 14 16:43:38 2019

72(dos_mode_debug_print):         --
Locking db 2048514125 key FA734F16000000009142
285(share_mode_memcache_fetch):           share_mode_memcache_fetch:
fetched entry for file sub_dir seq cf24aa6df5275714 key
164f73fa:b67c55175d5c4291:0
1139(find_delete_on_close_token):           find_delete_on_close_token:
name_hash = 0xe1a55ab3

servicepath:                        '/top1/share'
base_name:                            *
base_name:                            'sub_dir'
stream_name:                        NULL
num_share_modes:                    0x00000000 (0)
extid:                                0x0000000000000000 (0)         
157(share_mode_memcache_delete):     share_mode_memcache_delete: deleting
entry for file sub_dir seq cf24aa6df5275714 key
164f73fa:b67c55175d5c4291:0
358(unparse_share_modes):             No used share mode found
--
change_to_user_internal:             Impersonated user: uid=(0,0),
gid=(0,1000512), cwd=[/top1/share]
481(unix_convert):                       unix_convert called on file
"sub_dir"
245(stat_cache_lookup):                 stat_cache_lookup: lookup failed
for name [SUB_DIR]
682(unix_convert):                       unix_convert begin: name =
sub_dir, dirpath = ., start = sub_dir
705(unix_convert):                       conversion of base_name finished
sub_dir -> sub_dir
5625(create_file_default):             create_file_default: create_file:
access_mask = 0x80 file_attributes = 0x10, share_access = 0x7,
create_disposition = 0x1 create_options = 0x1 oplock_request = 0x0
private_flags = 0x0 root_dir_fid = 0x0, ea_list = (nil), sd = (nil), fname
= sub_dir
5075(create_file_unixpath):            create_file_unixpath:
create_file_unixpath: access_mask = 0x80 file_attributes = 0x10,
share_access = 0x7, create_disposition = 0x1 create_options = 0x1
oplock_request = 0x0 private_flags = 0x0 ea_list = (nil), sd = (nil),
fname = sub_dir
4005(open_directory):                 open_directory: opening directory
sub_dir, access_mask = 0x80, share_access = 0x7 create_options = 0x1,
create_disposition = 0x1, file_attributes = 0x10
109(smbd_check_access_rights):         smbd_check_access_rights: root
override on sub_dir. Granting 0x80
130(dbwrap_lock_order_lock):          dbwrap_lock_order_lock: check lock
order 1 for smbXsrv_open_global.tdb

allocated file structure fnum 820903026 (1 used):         
747(file_name_hash):                 file_name_hash: /top1/share/sub_dir
hash 0xe1a55ab3
4213(open_directory):                   Not opening Directory sub_dir
130(dbwrap_lock_order_lock):         dbwrap_lock_order_lock: check lock
order 1 for locking.tdb

servicepath:                        '/top1/share'
base_name:                            *
base_name:                            'sub_dir'
stream_name:                        NULL
num_share_modes:                    0x00000001 (1):
extid:                                0x0000000000000000 (0)
157(share_mode_memcache_delete):     share_mode_memcache_delete: deleting
entry for file sub_dir seq 5c9538e21713d24c key
164f73fa:b67c55175d5c4291:0
159(dbwrap_lock_order_unlock):         dbwrap_lock_order_unlock: release
lock order 1 for locking.tdb
Unlocking db 2048514125 key FA734F16000000009142
171(share_mode_memcache_store):     share_mode_memcache_store: stored
entry for file sub_dir seq 5c9538e21713d24d key
164f73fa:b67c55175d5c4291:0
5433(create_file_unixpath):         create_file_unixpath: info=1
create_file: info=1
734(dos_mode):                           dos_mode: sub_dir
285(parse_dos_attribute_blob):         parse_dos_attribute_blob: sub_dir
attr = 0x10
325(parse_dos_attribute_blob):         parse_dos_attribute_blob: file
sub_dir case 3 set btime Fri Jun 14 16:43:38 2019

72(dos_mode_debug_print):         --
Locking db 2048514125 key FA734F16000000009142
285(share_mode_memcache_fetch):           share_mode_memcache_fetch:
fetched entry for file sub_dir seq 5c9538e21713d24d key
164f73fa:b67c55175d5c4291:0
1139(find_delete_on_close_token):           find_delete_on_close_token:
name_hash = 0xe1a55ab3
--
servicepath:                        '/top1/share'
base_name:                            *
base_name:                            'sub_dir'
stream_name:                        NULL
num_share_modes:                    0x00000000 (0):         --
extid:                                0x0000000000000000 (0):     
    
157(share_mode_memcache_delete):          share_mode_memcache_delete:
deleting entry for file sub_dir seq 5c9538e21713d24d key
164f73fa:b67c55175d5c4291:0
358(unparse_share_modes):                  No used share mode found
--
change_to_user_internal:             Impersonated user: uid=(0,0),
gid=(0,1000512), cwd=[/top1/share]
481(unix_convert):                       unix_convert called on file
"sub_dir/sub_sub_dir"
245(stat_cache_lookup):             stat_cache_lookup: lookup failed for
name [SUB_DIR/SUB_SUB_DIR]
245(stat_cache_lookup):             stat_cache_lookup: lookup failed for
name [SUB_DIR]
682(unix_convert):                       unix_convert begin: name =
sub_dir/sub_sub_dir, dirpath = ., start = sub_dir/sub_sub_dir
233(check_parent_exists):             check_parent_exists: name =
sub_dir/sub_sub_dir, dirpath = sub_dir, start = sub_sub_dir
418(is_mangled):                       is_mangled sub_sub_dir ?
357(is_mangled_component):             is_mangled_component sub_sub_dir
(len 11) ?
418(is_mangled):                       is_mangled sub_sub_dir ?
357(is_mangled_component):             is_mangled_component sub_sub_dir
(len 11) ?
1272(unix_convert):                   dirpath = [sub_dir] start =
[sub_sub_dir]
1787(filename_convert_internal):    filename_convert_internal:
unix_convert failed for name sub_dir/sub_sub_dir with
NT_STATUS_INVALID_PARAMETER
944(smb2_set_operation_credit):     smb2_set_operation_credit:
smb2_set_operation_credit: requested 1, charge 1, granted 1, current
possible/max 1/8192, total granted/max/low/range 8192/8192/19/8192

Regards,

Sascha Brutscher
Administration
---------------------------------------------
medicomp
Gesellschaft für neue Medien und Computer mbH
Hoheloogstr. 14
67065 Ludwigshafen
Deutschland



More information about the samba mailing list