Bug 7693 - smbd changing mode of files on rename
smbd changing mode of files on rename
Status: RESOLVED FIXED
Product: Samba 3.6
Classification: Unclassified
Component: File services
unspecified
Other Linux
: P3 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-22 12:58 UTC by Jeff Layton
Modified: 2010-09-25 07:51 UTC (History)
0 users

See Also:


Attachments
git-am fix for 3.5.next (2.02 KB, patch)
2010-09-22 20:19 UTC, Jeremy Allison
no flags Details
Fixed git-am patch for 3.5.next. (1.95 KB, patch)
2010-09-22 20:41 UTC, Jeremy Allison
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Layton 2010-09-22 12:58:54 UTC
I was doing some testing with the linux CIFS client (with unix extensions
enabled) and noticed that the nfsidem test was failing. I've narrowed down the
problem to this:

[root@rawhide TEST]# chmod 0611 BAR
[root@rawhide TEST]# stat BAR
  File: `BAR'
  Size: 23         Blocks: 2048       IO Block: 16384  regular file
Device: 15h/21d Inode: 221217      Links: 1
Access: (0611/-rw---x--x)  Uid: (50000/testuser)   Gid: (50000/testuser)
Access: 2010-07-23 17:34:37.000000000 -0400
Modify: 2010-07-23 17:34:37.000000000 -0400
Change: 2010-07-23 17:46:52.000000000 -0400
[root@rawhide TEST]# mv BAR FOO
[root@rawhide TEST]# stat FOO
  File: `FOO'
  Size: 23         Blocks: 2048       IO Block: 16384  regular file
Device: 15h/21d Inode: 221217      Links: 1
Access: (0711/-rwx--x--x)  Uid: (50000/testuser)   Gid: (50000/testuser)
Access: 2010-07-23 17:34:37.000000000 -0400
Modify: 2010-07-23 17:34:37.000000000 -0400
Change: 2010-07-23 17:47:06.000000000 -0400

...during the rename, samba is adding the u+x to the mode of the file. This
change is not requested by the client. I'm running:

samba-3.5.5-68.fc14.x86_64

...but we see similar behavior with more recent code too.

The issue seems to be that the "map archive" option is respected even when using unix extensions, and probably shouldn't be.
Comment 1 Jeremy Allison 2010-09-22 20:19:54 UTC
Created attachment 5976 [details]
git-am fix for 3.5.next

Fix for 3.5.next. Volker please review then reassign to Karolin if you're ok with it.

Jeremy.
Comment 2 Jeremy Allison 2010-09-22 20:41:21 UTC
Created attachment 5977 [details]
Fixed git-am patch for 3.5.next.

Thanks Volker - fixed patch using lp_posix_pathnames() not lp_unix_extensions().

Jeremy.
Comment 3 Karolin Seeger 2010-09-25 07:51:09 UTC
Pushed to v3-5-test.
Closing out bug report.

Thanks!