Bug 6635 - cannot rename files/dirs
cannot rename files/dirs
Status: ASSIGNED
Product: Samba 3.3
Classification: Unclassified
Component: File services
3.3.2
x86 Linux
: P3 major
: ---
Assigned To: Volker Lendecke
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-13 13:23 UTC by Lanny
Modified: 2013-05-23 21:09 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lanny 2009-08-13 13:23:01 UTC
In a share on a PDC, with the following config, files can be created and deleted but cannot be renamed, not even by the named people in write list =

[quickbooks-backup]
        comment = Quickbooks backups
        path = /smb/quickbooks-backups
        write list = lnb, noemie
        read only = No
        create mask = 0755
        directory mask = 0775
        available = Yes

smbclient //myomie/quickbooks-backup
Enter lnb's password: 
Domain=[FREEBSD] OS=[Unix] Server=[Samba 3.3.2]
smb: \> mkdir sambafile
smb: \> ls sambafile
  sambafile                           D        0  Thu Aug 13 14:05:03 2009

		45539 blocks of size 8388608. 28796 blocks available

smb:> ren sambafile deadfile
NT_STATUS_ACCESS_DENIED renaming files \sambafile -> \deadfile


tail -400 log.myomie
  smb_mid=38
  smt_wct=1
  smb_vwv[ 0]=    1 (0x1)
  smb_bcc=16
[2009/08/13 14:18:41,  3] smbd/process.c:switch_message(1378)
  switch message SMBecho (pid 21321) conn 0x0
[2009/08/13 14:18:41,  3] smbd/sec_ctx.c:set_sec_ctx(324)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2009/08/13 14:18:41,  5] auth/token_util.c:debug_nt_user_token(522)
  NT user token: (NULL)
[2009/08/13 14:18:41,  5] auth/token_util.c:debug_unix_user_token(548)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2009/08/13 14:18:41,  5] smbd/uid.c:change_to_root_user(318)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2009/08/13 14:18:41,  5] lib/util.c:show_msg(645)
[2009/08/13 14:18:41,  5] lib/util.c:show_msg(655)
  size=53
  smb_com=0x2b
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=136
  smb_flg2=51201
  smb_tid=65535
  smb_pid=21320
  smb_uid=100
  smb_mid=38
  smt_wct=1
  smb_vwv[ 0]=    1 (0x1)
  smb_bcc=16
[2009/08/13 14:18:41,  3] smbd/reply.c:reply_echo(4659)
  echo 1 times
[2009/08/13 14:18:46,  6] smbd/process.c:process_smb(1551)
  got message type 0x0 of len 0x35
[2009/08/13 14:18:46,  3] smbd/process.c:process_smb(1554)
  Transaction 38 of length 57 (0 toread)
[2009/08/13 14:18:46,  5] lib/util.c:show_msg(645)
[2009/08/13 14:18:46,  5] lib/util.c:show_msg(655)
  size=53
  smb_com=0x2b
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=8
  smb_flg2=51201
  smb_tid=65535
  smb_pid=21320
  smb_uid=100
  smb_mid=39
  smt_wct=1
  smb_vwv[ 0]=    1 (0x1)
  smb_bcc=16
[2009/08/13 14:18:46,  3] smbd/process.c:switch_message(1378)
  switch message SMBecho (pid 21321) conn 0x0
[2009/08/13 14:18:46,  3] smbd/sec_ctx.c:set_sec_ctx(324)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2009/08/13 14:18:46,  5] auth/token_util.c:debug_nt_user_token(522)
  NT user token: (NULL)
[2009/08/13 14:18:46,  5] auth/token_util.c:debug_unix_user_token(548)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2009/08/13 14:18:46,  5] smbd/uid.c:change_to_root_user(318)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2009/08/13 14:18:46,  5] lib/util.c:show_msg(645)
[2009/08/13 14:18:46,  5] lib/util.c:show_msg(655)
  size=53
  smb_com=0x2b
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=136
  smb_flg2=51201
  smb_tid=65535
  smb_pid=21320
  smb_uid=100
  smb_mid=39
  smt_wct=1
  smb_vwv[ 0]=    1 (0x1)
  smb_bcc=16
[2009/08/13 14:18:46,  3] smbd/reply.c:reply_echo(4659)
  echo 1 times
[2009/08/13 14:18:51,  6] smbd/process.c:process_smb(1551)
  got message type 0x0 of len 0x35
[2009/08/13 14:18:51,  3] smbd/process.c:process_smb(1554)
  Transaction 39 of length 57 (0 toread)
[2009/08/13 14:18:51,  5] lib/util.c:show_msg(645)
[2009/08/13 14:18:51,  5] lib/util.c:show_msg(655)
  size=53
  smb_com=0x2b
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=8
  smb_flg2=51201
  smb_tid=65535
  smb_pid=21320
  smb_uid=100
  smb_mid=40
  smt_wct=1
  smb_vwv[ 0]=    1 (0x1)
  smb_bcc=16
[2009/08/13 14:18:51,  3] smbd/process.c:switch_message(1378)
  switch message SMBecho (pid 21321) conn 0x0
[2009/08/13 14:18:51,  3] smbd/sec_ctx.c:set_sec_ctx(324)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2009/08/13 14:18:51,  5] auth/token_util.c:debug_nt_user_token(522)
  NT user token: (NULL)
[2009/08/13 14:18:51,  5] auth/token_util.c:debug_unix_user_token(548)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2009/08/13 14:18:51,  5] smbd/uid.c:change_to_root_user(318)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2009/08/13 14:18:51,  5] lib/util.c:show_msg(645)
[2009/08/13 14:18:51,  5] lib/util.c:show_msg(655)
  size=53
  smb_com=0x2b
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=136
  smb_flg2=51201
  smb_tid=65535
  smb_pid=21320
  smb_uid=100
  smb_mid=40
  smt_wct=1
  smb_vwv[ 0]=    1 (0x1)
  smb_bcc=16
[2009/08/13 14:18:51,  3] smbd/reply.c:reply_echo(4659)
  echo 1 times
[2009/08/13 14:18:56,  6] smbd/process.c:process_smb(1551)
  got message type 0x0 of len 0x35
[2009/08/13 14:18:56,  3] smbd/process.c:process_smb(1554)
  Transaction 40 of length 57 (0 toread)
[2009/08/13 14:18:56,  5] lib/util.c:show_msg(645)
[2009/08/13 14:18:56,  5] lib/util.c:show_msg(655)
  size=53
  smb_com=0x2b
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=8
  smb_flg2=51201
  smb_tid=65535
  smb_pid=21320
  smb_uid=100
  smb_mid=41
  smt_wct=1
  smb_vwv[ 0]=    1 (0x1)
  smb_bcc=16
[2009/08/13 14:18:56,  3] smbd/process.c:switch_message(1378)
  switch message SMBecho (pid 21321) conn 0x0
[2009/08/13 14:18:56,  3] smbd/sec_ctx.c:set_sec_ctx(324)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2009/08/13 14:18:56,  5] auth/token_util.c:debug_nt_user_token(522)
  NT user token: (NULL)
[2009/08/13 14:18:56,  5] auth/token_util.c:debug_unix_user_token(548)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2009/08/13 14:18:56,  5] smbd/uid.c:change_to_root_user(318)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2009/08/13 14:18:56,  5] lib/util.c:show_msg(645)
[2009/08/13 14:18:56,  5] lib/util.c:show_msg(655)
  size=53
  smb_com=0x2b
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=136
  smb_flg2=51201
  smb_tid=65535
  smb_pid=21320
  smb_uid=100
  smb_mid=41
  smt_wct=1
  smb_vwv[ 0]=    1 (0x1)
  smb_bcc=16
[2009/08/13 14:18:56,  3] smbd/reply.c:reply_echo(4659)
  echo 1 times
[2009/08/13 14:19:01,  6] smbd/process.c:process_smb(1551)
  got message type 0x0 of len 0x35
[2009/08/13 14:19:01,  3] smbd/process.c:process_smb(1554)
  Transaction 41 of length 57 (0 toread)
[2009/08/13 14:19:01,  5] lib/util.c:show_msg(645)
[2009/08/13 14:19:01,  5] lib/util.c:show_msg(655)
  size=53
  smb_com=0x2b
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=8
  smb_flg2=51201
  smb_tid=65535
  smb_pid=21320
  smb_uid=100
  smb_mid=42
  smt_wct=1
  smb_vwv[ 0]=    1 (0x1)
  smb_bcc=16
[2009/08/13 14:19:01,  3] smbd/process.c:switch_message(1378)
  switch message SMBecho (pid 21321) conn 0x0
[2009/08/13 14:19:01,  3] smbd/sec_ctx.c:set_sec_ctx(324)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2009/08/13 14:19:01,  5] auth/token_util.c:debug_nt_user_token(522)
  NT user token: (NULL)
[2009/08/13 14:19:01,  5] auth/token_util.c:debug_unix_user_token(548)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2009/08/13 14:19:01,  5] smbd/uid.c:change_to_root_user(318)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2009/08/13 14:19:01,  5] lib/util.c:show_msg(645)
[2009/08/13 14:19:01,  5] lib/util.c:show_msg(655)
  size=53
  smb_com=0x2b
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=136
  smb_flg2=51201
  smb_tid=65535
  smb_pid=21320
  smb_uid=100
  smb_mid=42
  smt_wct=1
  smb_vwv[ 0]=    1 (0x1)
  smb_bcc=16
[2009/08/13 14:19:01,  3] smbd/reply.c:reply_echo(4659)
  echo 1 times
[2009/08/13 14:19:06,  6] smbd/process.c:process_smb(1551)
  got message type 0x0 of len 0x35
[2009/08/13 14:19:06,  3] smbd/process.c:process_smb(1554)
  Transaction 42 of length 57 (0 toread)
[2009/08/13 14:19:06,  5] lib/util.c:show_msg(645)
[2009/08/13 14:19:06,  5] lib/util.c:show_msg(655)
  size=53
  smb_com=0x2b
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=8
  smb_flg2=51201
  smb_tid=65535
  smb_pid=21320
  smb_uid=100
  smb_mid=43
  smt_wct=1
  smb_vwv[ 0]=    1 (0x1)
  smb_bcc=16
[2009/08/13 14:19:06,  3] smbd/process.c:switch_message(1378)
  switch message SMBecho (pid 21321) conn 0x0
[2009/08/13 14:19:06,  3] smbd/sec_ctx.c:set_sec_ctx(324)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2009/08/13 14:19:06,  5] auth/token_util.c:debug_nt_user_token(522)
  NT user token: (NULL)
[2009/08/13 14:19:06,  5] auth/token_util.c:debug_unix_user_token(548)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2009/08/13 14:19:06,  5] smbd/uid.c:change_to_root_user(318)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2009/08/13 14:19:06,  5] lib/util.c:show_msg(645)
[2009/08/13 14:19:06,  5] lib/util.c:show_msg(655)
  size=53
  smb_com=0x2b
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=136
  smb_flg2=51201
  smb_tid=65535
  smb_pid=21320
  smb_uid=100
  smb_mid=43
  smt_wct=1
  smb_vwv[ 0]=    1 (0x1)
  smb_bcc=16
[2009/08/13 14:19:06,  3] smbd/reply.c:reply_echo(4659)
  echo 1 times
[2009/08/13 14:19:08,  6] smbd/process.c:process_smb(1551)
  got message type 0x0 of len 0x4a
[2009/08/13 14:19:08,  3] smbd/process.c:process_smb(1554)
  Transaction 43 of length 78 (0 toread)
[2009/08/13 14:19:08,  5] lib/util.c:show_msg(645)
[2009/08/13 14:19:08,  5] lib/util.c:show_msg(655)
  size=74
  smb_com=0x7
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=8
  smb_flg2=51201
  smb_tid=1
  smb_pid=21320
  smb_uid=100
  smb_mid=44
  smt_wct=1
  smb_vwv[ 0]=   22 (0x16)
  smb_bcc=37
[2009/08/13 14:19:08,  3] smbd/process.c:switch_message(1378)
  switch message SMBmv (pid 21321) conn 0xb93c1aa0
[2009/08/13 14:19:08,  3] smbd/sec_ctx.c:set_sec_ctx(324)
  setting sec ctx (1000, 1000) - sec_ctx_stack_ndx = 0
[2009/08/13 14:19:08,  5] auth/token_util.c:debug_nt_user_token(528)
  NT user token of user S-1-5-21-3687798074-1565233067-2601336905-3000
  contains 7 SIDs
  SID[  0]: S-1-5-21-3687798074-1565233067-2601336905-3000
  SID[  1]: S-1-5-21-3687798074-1565233067-2601336905-1006
  SID[  2]: S-1-1-0
  SID[  3]: S-1-5-2
  SID[  4]: S-1-5-11
  SID[  5]: S-1-5-21-3687798074-1565233067-2601336905-512
  SID[  6]: S-1-22-1-1000
  SE_PRIV  0x0 0x0 0x0 0x0
[2009/08/13 14:19:08,  5] auth/token_util.c:debug_unix_user_token(548)
  UNIX token of user 1000
  Primary group is 1000 and contains 0 supplementary groups
[2009/08/13 14:19:08,  5] smbd/uid.c:change_to_user(303)
  change_to_user uid=(0,1000) gid=(0,1000)
[2009/08/13 14:19:08,  3] smbd/reply.c:reply_mv(6104)
  reply_mv : somedir -> olddir
[2009/08/13 14:19:08,  5] smbd/filename.c:unix_convert(148)
  unix_convert called on file "somedir"
[2009/08/13 14:19:08,  5] smbd/filename.c:unix_convert(148)
  unix_convert called on file "olddir"
[2009/08/13 14:19:08,  5] smbd/filename.c:unix_convert(303)
  unix_convert begin: name = olddir, dirpath = , start = olddir
[2009/08/13 14:19:08,  5] smbd/filename.c:unix_convert(559)
  New file olddir
[2009/08/13 14:19:08,  3] smbd/reply.c:rename_internals(5832)
  rename_internals: case_sensitive = 0, case_preserve = 1, short case preserve = 1, directory = ./somedir, newname = ./olddir, last_component_dest = olddir, is_8_3 = 1
[2009/08/13 14:19:08,  5] smbd/open.c:open_directory(2396)
  open_directory: opening directory ./somedir, access_mask = 0x10000, share_access = 0x3 create_options = 0x0, create_disposition = 0x1, file_attributes = 0x0
[2009/08/13 14:19:08,  3] smbd/reply.c:rename_internals(5876)
  Could not open rename source ./somedir: NT_STATUS_ACCESS_DENIED
[2009/08/13 14:19:08,  3] smbd/error.c:error_packet_set(61)
  error packet at smbd/reply.c(6114) cmd=7 (SMBmv) NT_STATUS_ACCESS_DENIED
[2009/08/13 14:19:08,  5] lib/util.c:show_msg(645)
[2009/08/13 14:19:08,  5] lib/util.c:show_msg(655)
  size=35
  smb_com=0x7
  smb_rcls=34
  smb_reh=0
  smb_err=49152
  smb_flg=136
  smb_flg2=51201
  smb_tid=1
  smb_pid=21320
  smb_uid=100
  smb_mid=44
  smt_wct=0
  smb_bcc=0
[2009/08/13 14:19:11,  6] smbd/process.c:process_smb(1551)
  got message type 0x0 of len 0x35
[2009/08/13 14:19:11,  3] smbd/process.c:process_smb(1554)
  Transaction 44 of length 57 (0 toread)
[2009/08/13 14:19:11,  5] lib/util.c:show_msg(645)
[2009/08/13 14:19:11,  5] lib/util.c:show_msg(655)
  size=53
  smb_com=0x2b
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=8
  smb_flg2=51201
  smb_tid=65535
  smb_pid=21320
  smb_uid=100
  smb_mid=45
  smt_wct=1
  smb_vwv[ 0]=    1 (0x1)
  smb_bcc=16
[2009/08/13 14:19:11,  3] smbd/process.c:switch_message(1378)
  switch message SMBecho (pid 21321) conn 0x0
[2009/08/13 14:19:11,  3] smbd/sec_ctx.c:set_sec_ctx(324)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2009/08/13 14:19:11,  5] auth/token_util.c:debug_nt_user_token(522)
  NT user token: (NULL)
[2009/08/13 14:19:11,  5] auth/token_util.c:debug_unix_user_token(548)
  UNIX token of user 0
  Primary group is 0 and contains 0 supplementary groups
[2009/08/13 14:19:11,  5] smbd/uid.c:change_to_root_user(318)
  change_to_root_user: now uid=(0,0) gid=(0,0)
[2009/08/13 14:19:11,  5] lib/util.c:show_msg(645)
[2009/08/13 14:19:11,  5] lib/util.c:show_msg(655)
  size=53
  smb_com=0x2b
  smb_rcls=0
  smb_reh=0
  smb_err=0
  smb_flg=136
  smb_flg2=51201
  smb_tid=65535
  smb_pid=21320
  smb_uid=100
  smb_mid=45
  smt_wct=1
  smb_vwv[ 0]=    1 (0x1)
  smb_bcc=16
[2009/08/13 14:19:11,  3] smbd/reply.c:reply_echo(4659)
  echo 1 times
Comment 1 Jeremy Allison 2009-08-13 16:37:41 UTC
What are the permissions on the directory "/smb/quickbooks-backups" in your filesystem ?

Is it possible this is the same as bug #6297:

https://bugzilla.samba.org/show_bug.cgi?id=6297

(it looks very similar) which I fixed for 3.3.5 ?

Jeremy
Comment 2 Jeremy Allison 2009-08-14 16:43:54 UTC
Hmmm. Unfortunately this doesn't look like bug #6297 - that
was with the sticky bit on the directory. I'm going to try
and reproduce this with the current 3.2 code and see if it's
still a problem. I don't think so, but it doesn't hurt to
be sure. The debug level 10 you posted shows an ACCESS_DENIED
on attempting to open the directory ./somedir for rename,
but I don't know exactly why that open failed (ie. what
area of the code denied it).

If it still fails with the latest code I'm going to
send you some patches to instrument the open_directory
code so I know why it's failing.

Jeremy.