No access to home folder via SMB

Hi,

I have one user which suddenly can not access it’s own home directory via SMB from a windows client any longer. All shares are still working. All other users can still connect to their home folders via \\<ip-of-the-server\<username> except this one user.

I did not find anything in the log files that explain why this user can not access it’s home folder.

Any ideas where to search for a solution?

Andy

What are the rights of this folder? Login via SSH on your server with the shares, and execute this:
ls -l /home/youruserfolder

The user is the owner of the folder. The rights are rwx for the user.

The user can still login via ssh and work in the folder.

Which SMB Version is set for the share? Which Windows version is used? Is it the same as other users?

The folder is not set as share, it’s the home folder which is created automatically by UCS when creating the user. The OS on the client is win10. With the same client I can access other home folders when connecting with their credentials.

As I said it happened like one day to the other and only for one user.

If you would to access this folder from a Windows Machine, what error log did you see on the Server with the usershare?
journalctl -f (Livelogging)

This is the live log when accessing at first \\ip.of.the.server\ and then changing into the home folder of that user.

Aug 11 20:08:23 mail check_nrpe[7839]: Remote 192.168.178.2 accepted a Version 3 Packet
Aug 11 20:08:23 mail check_nrpe[7832]: Remote 192.168.178.2 accepted a Version 3 Packet
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2e268: dispatch_recv:  event 0x7fd02628f160 -> task 0x7fd0269efa90
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2c970: dispatch_recv:  event 0x7fd025457160 -> task 0x7fd025b39b50
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2c4c0: dispatch_recv:  event 0x7fd084834160 -> task 0x7fd0bf411010
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2e718: dispatch_recv:  event 0x7fd0257a4160 -> task 0x7fd025b39250
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad29bc8: dispatch_recv:  event 0x7fd025763160 -> task 0x7fd025b39310
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2e268: internal_recv: task 0x7fd0269efa90 got event 0x7fd0aad2e328
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2e718: internal_recv: task 0x7fd025b39250 got event 0x7fd0aad2e7d8
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad29bc8: internal_recv: task 0x7fd025b39310 got event 0x7fd0aad29c88
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2c970: internal_recv: task 0x7fd025b39b50 got event 0x7fd0aad2ca30
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2cbc8: dispatch_recv:  event 0x7fd026087160 -> task 0x7fd0269eff10
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2e268: processing cmsg 0x7fd0aad2d250
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2e268: processing cmsg 0x7fd0aad2d270
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2c010: dispatch_recv:  event 0x7fd0a9fe6160 -> task 0x7fd0aad2f910
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2e010: dispatch_recv:  event 0x7fd025498160 -> task 0x7fd025b39a90
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2c010: internal_recv: task 0x7fd0aad2f910 got event 0x7fd0aad2c0d0
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2e718: processing cmsg 0x7fd0aad2d310
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2e718: processing cmsg 0x7fd0aad2d330
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2e010: internal_recv: task 0x7fd025b39a90 got event 0x7fd0aad2e0d0
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2c4c0: internal_recv: task 0x7fd0bf411010 got event 0x7fd0aad2c580
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2c718: dispatch_recv:  event 0x7fd0253d5160 -> task 0x7fd025b39cd0
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2e4c0: dispatch_recv:  event 0x7fd0aa0ea400 -> task 0x7fd025b59610
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad29970: dispatch_recv:  event 0x7fd025047160 -> task 0x7fd025b48790
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2c268: dispatch_recv:  event 0x7fd08466d400 -> task 0x7fd025b59e50
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2c718: internal_recv: task 0x7fd025b39cd0 got event 0x7fd0aad2c7d8
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2cbc8: internal_recv: task 0x7fd0269eff10 got event 0x7fd0aad2cc88
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2e4c0: internal_recv: task 0x7fd025b59610 got event 0x7fd0aad2e580
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -3 for socket 549
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -3 for socket 554
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -3 for socket 550
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -3 for socket 556
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -3 for socket 552
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -3 for socket 553
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -3 for socket 555
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -3 for socket 558
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -2 for socket -1
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad29970: internal_recv: task 0x7fd025b48790 got event 0x7fd0aad29a30
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -3 for socket 548
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -2 for socket -1
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2c268: internal_recv: task 0x7fd025b59e50 got event 0x7fd0aad2c328
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -3 for socket 551
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -2 for socket -1
Aug 11 20:08:32 mail named[2674]: client @0x7fd06802be10: udprecv
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -3 for socket 557
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -2 for socket -1
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2e268: socket_recv: event 0x7fd02628f160 -> task 0x7fd0269efa90
Aug 11 20:08:32 mail named[2674]: client @0x7fd034019ae0: udprecv
Aug 11 20:08:32 mail named[2674]: socket 0x7fd0aad2e718: socket_recv: event 0x7fd0257a4160 -> task 0x7fd025b39250
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -3 for socket 559
Aug 11 20:08:32 mail named[2674]: sockmgr 0x7fd0bf3dc010: watcher got message -2 for socket -1

There is no samba message in the log. Maybe under /var/log/samba/…

I did set the smb debug level to 4 now and get the following in log.smbd

[2020/08/11 23:40:37.833893,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:37.833998,  4, pid=404] ../../source3/smbd/vfs.c:805(vfs_ChDir)
  vfs_ChDir to /home/andreasseiler
[2020/08/11 23:40:37.834052,  4, pid=404] ../../source3/smbd/vfs.c:859(vfs_ChDir)
  vfs_ChDir got /home/andreasseiler
[2020/08/11 23:40:37.834196,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.834236,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:37.834260,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.834309,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:37.834341,  4, pid=404] ../../source3/smbd/open.c:3308(open_file_ntcreate)
  calling open_file with flags=0x0 flags2=0x800 mode=0600, access_mask = 0x100080, open_access_mask = 0x100080
[2020/08/11 23:40:37.834374,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.834403,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:37.834427,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.834471,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:37.834619,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.834680,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:37.834778,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.834826,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:37.835128,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.835173,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:37.835199,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.835231,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:37.835379,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.835415,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:37.835448,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.835496,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:37.835576,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.835611,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:37.835633,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.835668,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:37.864387,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.864435,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:37.864459,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.864508,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:37.918442,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.918488,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:37.918511,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.918558,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:37.918585,  4, pid=404] ../../source3/smbd/open.c:3308(open_file_ntcreate)
  calling open_file with flags=0x0 flags2=0x800 mode=0600, access_mask = 0x100081, open_access_mask = 0x100081
[2020/08/11 23:40:37.918610,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.918650,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:37.918673,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.918715,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:37.918807,  3, pid=404] ../../source3/smbd/smb2_server.c:3194(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_ACCESS_DENIED] || at ../../source3/smbd/smb2_create.c:296
[2020/08/11 23:40:37.922106,  3, pid=404] ../../source3/smbd/filename.c:1445(get_real_filename_full_scan)
  scan dir didn't open dir [.]
[2020/08/11 23:40:37.922149,  3, pid=404] ../../source3/smbd/smb2_server.c:3194(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_ACCESS_DENIED] || at ../../source3/smbd/smb2_create.c:296
[2020/08/11 23:40:37.946227,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.946271,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:37.946293,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.946341,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:37.946370,  4, pid=404] ../../source3/smbd/open.c:3308(open_file_ntcreate)
  calling open_file with flags=0x0 flags2=0x800 mode=0600, access_mask = 0x100081, open_access_mask = 0x100081
[2020/08/11 23:40:37.946415,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.946444,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:37.946467,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.946510,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:37.946555,  3, pid=404] ../../source3/smbd/smb2_server.c:3194(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_ACCESS_DENIED] || at ../../source3/smbd/smb2_create.c:296
[2020/08/11 23:40:37.948215,  3, pid=404] ../../source3/smbd/filename.c:1445(get_real_filename_full_scan)
  scan dir didn't open dir [.]
[2020/08/11 23:40:37.948257,  3, pid=404] ../../source3/smbd/smb2_server.c:3194(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_ACCESS_DENIED] || at ../../source3/smbd/smb2_create.c:296
[2020/08/11 23:40:37.973563,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.973610,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:37.973634,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.973683,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:37.973712,  4, pid=404] ../../source3/smbd/open.c:3308(open_file_ntcreate)
  calling open_file with flags=0x0 flags2=0x800 mode=0600, access_mask = 0x100081, open_access_mask = 0x100081
[2020/08/11 23:40:37.973741,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.973767,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:37.973790,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:37.973833,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:37.973918,  3, pid=404] ../../source3/smbd/smb2_server.c:3194(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_ACCESS_DENIED] || at ../../source3/smbd/smb2_create.c:296
[2020/08/11 23:40:38.001325,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:38.001368,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:38.001391,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:38.001440,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:38.001469,  4, pid=404] ../../source3/smbd/open.c:3308(open_file_ntcreate)
  calling open_file with flags=0x0 flags2=0x800 mode=0600, access_mask = 0x100081, open_access_mask = 0x100081
[2020/08/11 23:40:38.001497,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:38.001523,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:38.001546,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:38.001615,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:38.001708,  3, pid=404] ../../source3/smbd/smb2_server.c:3194(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_ACCESS_DENIED] || at ../../source3/smbd/smb2_create.c:296
[2020/08/11 23:40:38.030653,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:38.030701,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:38.030726,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:38.030775,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:38.030804,  4, pid=404] ../../source3/smbd/open.c:3308(open_file_ntcreate)
  calling open_file with flags=0x0 flags2=0x800 mode=0600, access_mask = 0x100081, open_access_mask = 0x100081
[2020/08/11 23:40:38.030830,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:38.030857,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:38.030905,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:38.030958,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:38.031052,  3, pid=404] ../../source3/smbd/smb2_server.c:3194(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_ACCESS_DENIED] || at ../../source3/smbd/smb2_create.c:296
[2020/08/11 23:40:39.873469,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:39.873538,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:39.873562,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:39.873626,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:39.873655,  4, pid=404] ../../source3/smbd/open.c:3308(open_file_ntcreate)
  calling open_file with flags=0x0 flags2=0x800 mode=0600, access_mask = 0x100081, open_access_mask = 0x100081
[2020/08/11 23:40:39.873687,  4, pid=404] ../../source3/smbd/sec_ctx.c:216(push_sec_ctx)
  push_sec_ctx(3000024, 5001) : sec_ctx_stack_ndx = 1
[2020/08/11 23:40:39.873713,  4, pid=404] ../../source3/smbd/uid.c:576(push_conn_ctx)
  push_conn_ctx(2067482063) : conn_ctx_stack_ndx = 0
[2020/08/11 23:40:39.873736,  4, pid=404] ../../source3/smbd/sec_ctx.c:320(set_sec_ctx_internal)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2020/08/11 23:40:39.873778,  4, pid=404] ../../source3/smbd/sec_ctx.c:438(pop_sec_ctx)
  pop_sec_ctx (3000024, 5001) - sec_ctx_stack_ndx = 0
[2020/08/11 23:40:39.873900,  3, pid=404] ../../source3/smbd/smb2_server.c:3194(smbd_smb2_request_error_ex)
  smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_ACCESS_DENIED] || at ../../source3/smbd/smb2_create.c:296

I moved the original user home folder and created a new folder with 777 rights. This time I have been able to access the folder. After this I created a file in this new user home folder and the weird thing is, that this file has a complete different UID. Originally the user has 2062 but the file that have been created via smb has 3000024.

I found the following thread in this forum and checked ldbedit -e vi -H /var/lib/samba/private/idmap.ldb but the user looks good. I am wondering why the mapping is made to uid 3000024.

# record 40
dn: CN=S-1-5-21-239385056-1278794407-800825067-1173
objectClass: sidMap
type: ID_TYPE_UID
xidNumber: 2062
cn: S-1-5-21-239385056-1278794407-800825067-1173
objectSid: S-1-5-21-239385056-1278794407-800825067-1173
distinguishedName: CN=S-1-5-21-239385056-1278794407-800825067-1173

# record 74
dn: CN=S-1-5-21-239385056-1278794407-800825067-1242
cn: S-1-5-21-239385056-1278794407-800825067-1242
objectClass: sidMap
objectSid: S-1-5-21-239385056-1278794407-800825067-1242
type: ID_TYPE_BOTH
xidNumber: 3000024
distinguishedName: CN=S-1-5-21-239385056-1278794407-800825067-1242

The UID 1242 does not exist in the LDAP. So where is this coming from?

Mastodon