Bug 1073384

Summary: gfs2_grow changes mtab permissions to 600
Product: Red Hat Enterprise Linux 5 Reporter: Andrew Price <anprice>
Component: gfs2-utilsAssignee: Andrew Price <anprice>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.11CC: adeshmuk, ccaulfie, cluster-maint, ctowsley, david.levene, jaeshin, james.radtke, jperezve, mjuricek, msivakum, rcrews, rpeterso, sbradley, swhiteho, teigland
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gfs2-utils-0.1.62-41.el5 Doc Type: Bug Fix
Doc Text:
After the gfs2_grow, gfs2_tool, gfs2_jadd, or gfs2_quota utilities cleaned up the /etc/mtab file, the file's permissions were changed from the default of 644 to 600. As a consequence, non-root processes could not read /etc/mtab. This update fixes the code that cleans up the /etc/mtab file so that it no longer modifies the /etc/mtab file's permissions. As a result, processes are able to access the /etc/mtab file as expected.
Story Points: ---
Clone Of: 1059853 Environment:
Last Closed: 2014-09-16 00:30:19 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: 1059853    
Bug Blocks: 1086861    
Attachments:
Description Flags
Patch backported from RHEL6 none

Comment 1 Andrew Price 2014-03-06 10:39:26 UTC
Created attachment 871329 [details]
Patch backported from RHEL6

This is the patch from RHEL6 which applies cleanly to the RHEL511 branch.

Comment 2 RHEL Program Management 2014-03-06 10:48:33 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 3 Andrew Price 2014-03-06 11:30:20 UTC
Testing without the above patch:

[root@hp-dl360g4-01 ~]# rpm -q gfs2-utils
gfs2-utils-0.1.62-39.el5
[root@hp-dl360g4-01 ~]# ls -l /etc/mtab
-rw-r--r-- 1 root root 358 Mar  6 06:21 /etc/mtab
[root@hp-dl360g4-01 ~]# gfs2_grow /mnt/test
Error: The device has grown by less than one Resource Group (RG).
The device grew by 0MB.  One RG is 255MB for this file system.
gfs2_grow complete.
[root@hp-dl360g4-01 ~]# ls -l /etc/mtab
-rw------- 1 root root 358 Mar  6 06:21 /etc/mtab

With the patch:

[root@hp-dl360g4-01 ~]# ls -l /etc/mtab
-rw-r--r-- 1 root root 358 Mar  6 06:26 /etc/mtab
[root@hp-dl360g4-01 ~]# gfs2_grow /mnt/test
Error: The device has grown by less than one Resource Group (RG).
The device grew by 0MB.  One RG is 255MB for this file system.
gfs2_grow complete.
[root@hp-dl360g4-01 ~]# ls -l /etc/mtab
-rw-r--r-- 1 root root 358 Mar  6 06:26 /etc/mtab

I've pushed the patch to cluster.git/RHEL511

Comment 16 errata-xmlrpc 2014-09-16 00:30:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1203.html