<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>pre,code,address {
margin: 0px;
}
h1,h2,h3,h4,h5,h6 {
margin-top: 0.2em;
margin-bottom: 0.2em;
}
ol,ul {
margin-top: 0em;
margin-bottom: 0em;
}
blockquote {
margin-top: 0em;
margin-bottom: 0em;
}
</style>
</head>
<body>
<div>The intention with the xattr access to NFSv4 ACLs is to allow usage of the Linux nfs4-acl-tools: <a href="https://www.ibm.com/docs/en/STXKQY/gpfsclustersfaq.html#nfsacl">https://www.ibm.com/docs/en/STXKQY/gpfsclustersfaq.html#nfsacl</a></div>
<div>The format should be visible in the source code of the tools, i think this would be the struct nfs4_acl: <a href="https://git.linux-nfs.org/?p=steved/nfs4-acl-tools.git;a=blob;f=include/nfs4.h;h=d15482e8a720e82d6248f311b537e1057c38adc2;hb=refs/heads/master#l129">https://git.linux-nfs.org/?p=steved/nfs4-acl-tools.git;a=blob;f=include/nfs4.h;h=d15482e8a720e82d6248f311b537e1057c38adc2;hb=refs/heads/master#l129</a></div>
<div><br>
</div>
<div>I am not sure of the observed behavior with the WRITE_ACL permission.. Recreating that with traces would help understand which case is hit.</div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
Christof Schmitt</div>
<div><br>
</div>
<div>On Tue, 2025-03-11 at 11:49 +0000, Losen, Stephen C (scl) wrote:</div>
<blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
<div>Hi folks,</div>
<div>I've been experimenting with python os.getxattr() and os.setxattr() for getting and setting NFS4 ACLs. I reverse engineered the format of the ACL returned by os.getxattr(), but is it documented anywhere?</div>
<div><br>
</div>
<div>I discovered a permission issue when running as a non-root user. If the target file is owned by a different user but has a NFS4 ACE with WRITE_ACL enabled for me, then os.setxattr() nevertheless fails for me with permission denied. As expected, os.chmod()
works for me and the chmod and mmputacl commands also work for me.</div>
<div><br>
</div>
<div>If I own the file, then os.setxattr() works.</div>
<div><br>
</div>
<div>Does anyone know if this is a feature or a bug? The behavior seems inconsistent.</div>
<div><br>
</div>
<div>Steve Losen</div>
<div>University of Virginia Research Computing</div>
<div><br>
</div>
<div>_______________________________________________</div>
<div>gpfsug-discuss mailing list</div>
<div>gpfsug-discuss at gpfsug.org</div>
<div><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss_gpfsug.org">https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss-5Fgpfsug.org&d=DwICAg&c=BSDicqBQBDjDI9RkVyTcHQ&r=wW7GaucbETGUxXa4sxUbwwMPlcigQrN1OsLr50M3jEg&m=3DAYrYWvqciSNCnDaF0zip4KpdOYd_J_dyFo-MIl-haDpW3eqGPAGxc6xWD-sGZu&s=WwdUOZcFWbRaYT09rkXYLsrQ13HrcOgdhNynbi964uU&e=</a> </div>
</blockquote>
<div><br>
</div>
<div><span></span></div>
</body>
</html>