[Samba] NT_STATUS_ACCESS_DENIED

Brandon Blackmoor bblackmoor at blackgate.net
Fri Apr 6 15:54:52 GMT 2007


Quoting Brian Cowan <brcowan at gmail.com>:
>
> A debug log may tell you something.

I have been looking at the logs, but just at the default log level. They haven't
shown anything at all other than that samba is running and that I connected to
the "media" share and then disconnected from it (which I did).

However, here is the log level set to 3:


[root at annwn samba]# tail -n100 annwn.log
[2007/04/06 11:34:44, 3] smbd/reply.c:reply_tcon_and_X(716)
  tconX service=MEDIA
[2007/04/06 11:34:44, 3] smbd/process.c:process_smb(1110)
  Transaction 7 of length 57
[2007/04/06 11:34:44, 3] smbd/process.c:switch_message(914)
  switch message SMBecho (pid 31305) conn 0x0
[2007/04/06 11:34:44, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2007/04/06 11:34:44, 3] smbd/reply.c:reply_echo(3584)
  echo 1 times
[2007/04/06 11:34:44, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2007/04/06 11:34:46, 3] smbd/process.c:process_smb(1110)
  Transaction 8 of length 106
[2007/04/06 11:34:46, 3] smbd/process.c:switch_message(914)
  switch message SMBtrans2 (pid 31305) conn 0x8fd4f30
[2007/04/06 11:34:46, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (502, 504) - sec_ctx_stack_ndx = 0
[2007/04/06 11:34:46, 3] smbd/trans2.c:call_trans2qfilepathinfo(2908)
  call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 257
[2007/04/06 11:34:46, 3] smbd/msdfs.c:dfs_redirect(435)
  dfs_redirect: Not redirecting annwn/media.
[2007/04/06 11:34:46, 3] smbd/msdfs.c:dfs_redirect(439)
  dfs_redirect: Path converted to non-dfs path
[2007/04/06 11:34:46, 3] smbd/trans2.c:call_trans2qfilepathinfo(2959)
  call_trans2qfilepathinfo . (fnum = -1) level=257 call=5 total_data=0
[2007/04/06 11:34:46, 3] smbd/process.c:process_smb(1110)
  Transaction 9 of length 116
[2007/04/06 11:34:46, 3] smbd/process.c:switch_message(914)
  switch message SMBtrans2 (pid 31305) conn 0x8fd4f30
[2007/04/06 11:34:46, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (502, 504) - sec_ctx_stack_ndx = 0
[2007/04/06 11:34:46, 3] smbd/trans2.c:call_trans2findfirst(1662)
  call_trans2findfirst: dirtype = 16, maxentries = 1366, close_after_first=0,
close_if_end = 2 requires_resume_key = 4 level = 0x104, max_data_bytes = 16644
[2007/04/06 11:34:46, 3] smbd/msdfs.c:dfs_redirect(435)
  dfs_redirect: Not redirecting annwn/media/*.
[2007/04/06 11:34:46, 3] smbd/msdfs.c:dfs_redirect(439)
  dfs_redirect: Path converted to non-dfs path *
[2007/04/06 11:34:46, 3] smbd/error.c:unix_error_packet(90)
  unix_error_packet: error string = Permission denied
[2007/04/06 11:34:46, 3] smbd/error.c:error_packet(146)
  error packet at smbd/trans2.c(1772) cmd=50 (SMBtrans2) NT_STATUS_ACCESS_DENIED
[2007/04/06 11:34:46, 3] smbd/process.c:process_smb(1110)
  Transaction 10 of length 106
[2007/04/06 11:34:46, 3] smbd/process.c:switch_message(914)
  switch message SMBtrans2 (pid 31305) conn 0x8fd4f30
[2007/04/06 11:34:46, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (502, 504) - sec_ctx_stack_ndx = 0
[2007/04/06 11:34:46, 3] smbd/trans2.c:call_trans2qfilepathinfo(2908)
  call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 257
[2007/04/06 11:34:46, 3] smbd/msdfs.c:dfs_redirect(435)
  dfs_redirect: Not redirecting annwn/media.
[2007/04/06 11:34:46, 3] smbd/msdfs.c:dfs_redirect(439)
  dfs_redirect: Path converted to non-dfs path
[2007/04/06 11:34:46, 3] smbd/trans2.c:call_trans2qfilepathinfo(2959)
  call_trans2qfilepathinfo . (fnum = -1) level=257 call=5 total_data=0
[2007/04/06 11:34:46, 3] smbd/process.c:process_smb(1110)
  Transaction 11 of length 39
[2007/04/06 11:34:46, 3] smbd/process.c:switch_message(914)
  switch message SMBdskattr (pid 31305) conn 0x8fd4f30
[2007/04/06 11:34:46, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (502, 504) - sec_ctx_stack_ndx = 0
[2007/04/06 11:34:46, 3] lib/sysquotas.c:sys_get_quota(448)
  sys_get_vfs_quota() failed for mntpath[/]
bdev[/dev/mapper/VolGroup00-LogVol00] qtype[2] id[502]: Invalid argument
[2007/04/06 11:34:46, 3] lib/sysquotas.c:sys_get_quota(448)
  sys_get_vfs_quota() failed for mntpath[/]
bdev[/dev/mapper/VolGroup00-LogVol00] qtype[4] id[504]: Invalid argument
[2007/04/06 11:34:46, 3] smbd/reply.c:reply_dskattr(1053)
  dskattr dfree=4170
[2007/04/06 11:34:49, 3] smbd/process.c:process_smb(1110)
  Transaction 12 of length 57
[2007/04/06 11:34:49, 3] smbd/process.c:switch_message(914)
  switch message SMBecho (pid 31305) conn 0x0
[2007/04/06 11:34:49, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2007/04/06 11:34:49, 3] smbd/reply.c:reply_echo(3584)
  echo 1 times
[2007/04/06 11:34:49, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2007/04/06 11:34:51, 3] smbd/process.c:process_smb(1110)
  Transaction 13 of length 39
[2007/04/06 11:34:51, 3] smbd/process.c:switch_message(914)
  switch message SMBtdis (pid 31305) conn 0x8fd4f30
[2007/04/06 11:34:51, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2007/04/06 11:34:51, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2007/04/06 11:34:51, 1] smbd/service.c:close_cnum(1141)
  annwn (192.168.1.90) closed connection to service media
[2007/04/06 11:34:51, 3] smbd/connection.c:yield_connection(69)
  Yielding connection to media
[2007/04/06 11:34:51, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2007/04/06 11:34:51, 3] smbd/process.c:timeout_processing(1359)
  timeout_processing: End of file from client (client has disconnected).
[2007/04/06 11:34:51, 3] smbd/sec_ctx.c:set_sec_ctx(241)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2007/04/06 11:34:51, 3] smbd/connection.c:yield_connection(69)
  Yielding connection to
[2007/04/06 11:34:51, 3] smbd/server.c:exit_server_common(675)
  Server exit (normal exit)


I can see the line where the error is generated:


[2007/04/06 11:34:46, 3] smbd/error.c:unix_error_packet(90)
  unix_error_packet: error string = Permission denied
[2007/04/06 11:34:46, 3] smbd/error.c:error_packet(146)
  error packet at smbd/trans2.c(1772) cmd=50 (SMBtrans2) NT_STATUS_ACCESS_DENIED


Does this tell me anything new?


> Also, see who the smbd process is running as....
> You may get an unpleasant surprise.


[root at annwn RPMs]# ps -ef | grep smbd
root      5501     1  0 Apr05 ?        00:00:00 smbd -D
root      5502  5501  0 Apr05 ?        00:00:00 smbd -D
root     30996  3882  0 11:05 pts/1    00:00:00 grep smbd


What would be considered "an unpleasant surprise" here?

(Incidentally, the Reply-To for this list is set up incorrectly. I have to
manually type in the address of the list every time I send a reply.)

--
Brandon Blackmoor
bblackmoor at blackgate.net
2007-04-06


More information about the samba mailing list