How do I make sure that the permissions I set for the files do not automatically change themselves whenever a user logs into the server?
Environment
- Red Hat Enterprise Linux Server 7 (with the High Availability and Resilient Storage Add Ons)
Issue
- The 2 systems share storage
/var/opt/data/cluster
. Thecluser
directory and everything inside it takes on the ownership of what ever user logs in automatically. I can manually change it back tomyuser:mygroup
by running achown
command as root, but as soon as someone else logs in it will take on the ownership of that user.
Filesystem is aresource
configured in cluster.
<instance_attributes id="clusterfs-instance_attributes">
<nvpair id="clusterfs-instance_attributes-device" name="device" value="/dev/cluster_vg/cluster_lv"/>
<nvpair id="clusterfs-instance_attributes-directory" name="directory" value="/var/opt/data"/>
<nvpair id="clusterfs-instance_attributes-fstype" name="fstype" value="gfs2"/>
<nvpair id="clusterfs-instance_attributes-options" name="options" value="noatime"/>
</instance_attributes>
Mounted as
/dev/mapper/cluster_vg-cluster_lv on /var/opt/data type gfs2 (rw,noatime,seclabel) [mycluster:cluster_lv]
checking if issue is due to seclabel mount option. Don't see this mount option in man page.
Resolution
In this case, there was UID mismatch between the accounts on the two servers associated with this cluster. So when the permissions on node2 server are changed to myuser
, the files in the cluster would show another
user on node1 server and when the files on node1 were changed to myuser
it would change the files on node2 server to anotheruser
, etc etc. So standardizing the UID's across both servers resolved the issue.
In this case, myuser
and anotheruser
are two user accounts.
Root Cause
Mismatch is the UIDs across the cluster nodes for the users accessing the file created the issue.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments