Bug 985790

Summary: SMB:Read only flag for a file gets unchecked when file is edited from cifs mount point
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: surabhi <sbhaloth>
Component: sambaAssignee: Christopher R. Hertel <crh>
Status: CLOSED WORKSFORME QA Contact: Ujjwala <ujjwala>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: rwheeler, sdharane, vagarwal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-07 11:10:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 956495    

Description surabhi 2013-07-18 09:09:27 UTC
Description of problem:
On the windows client when the gluster volume is smb mounted and a file is created with read only flag ,the RO flag get unchecked when file is edited from a different mount point.

Version-Release number of selected component (if applicable):
glusterfs 3.4.0.12rhs.beta4 built on Jul 11 2013 23:37:16

How reproducible:
Always

Steps to Reproduce:
1.create a gluster volume.
2.SMB mount the volume on both windows and linux client.
2.Access the volume via windows explorer
3.Right click on the explorer and create a new text file abc.txt.Set the read only flag for the file to make it in read only mode.
4.Open the file from linux mount,edit the file and save it.
5.Check the read only flag for the file abc.txt in windows.The read only flag becomes unchecked.

Actual results:
The read only flag is unchecked.


Expected results:
The read only flag on windows should not be unchecked.

Additional info:

Comment 2 Christopher R. Hertel 2013-07-18 16:55:41 UTC
Two follow-up tests that should be performed:
1) Run Samba on XFS and perform the same sequence.  Do we get the same result?
2) Run the same sequence, but use a Windows client instead.

The first test will let us know if this bug is part of the Gluster stack (vfs_glusterfs, libgfapi, or gluster itself), or part of the SMB portion of the stack (CIFS client and/or Samba).

The second test will allow us to rule out Samba and below.  If only the Linux CIFS client causes this problem to occur, then it is likely a bug in that component.

Comment 3 surabhi 2013-07-24 11:51:23 UTC
Installed latest glusterfs :
Version glusterfs-3.4.0.12rhs.beta5-2.el6rhs.x86_64

Performed the following:
Repeated the steps with Samba on XFS and the read only flag is not getting unchecked.

From windows client its working fine.

And now even from Linux client tried the same sequence and the issue is not reproducible.
Further if I am able to recreate the issue I will reopen it.

Chris,

If you want you can close the BZ for now.

Comment 4 Vivek Agarwal 2013-07-31 08:57:24 UTC
Please close the bug as this seems to be fixed.

Comment 5 Christopher R. Hertel 2013-08-05 21:37:34 UTC
Regarding comment #3:
- If I understand the results, we have determined that Samba on XFS provides correct behavior.
- If Samba on Gluster still fails to provide correct behavior, then we know that the problem lies within the vfs_glusterfs module or below.

The tests I recommended in comment #2 are there only to prove that Samba itself is not the problem (and neither is the Linux CIFS client or Windows client).

What comment #3 does not make clear is this:  Do these tests now pass when running on Samba+vfs_glusterfs+libgfapi?

Comment 6 surabhi 2013-08-07 07:20:37 UTC
Chris,
With the glusterfs version glusterfs-3.4.0.12rhs.beta5-2.el6rhs.x86_64 ,the issue was not seen.the read only flag is behaving the same way it is doing for xfs as expected.I will discuss with Talur and will put the bug in required state.

Comment 7 surabhi 2013-08-07 11:05:42 UTC
Verified with version glusterfs-3.4.0.16rhs-1.el6rhs.x86_64 , the issue is not seen.