Dear all,
we use lustre 2.12.2 (CentOS-7.6) and observe a problem where file
creation for unknown userids is not possible. Background is that
we export our lustre file system with ganesha-nfs (nfs vers. 3) to
nfs clients with userids unknown to the (nfs-)server.
Attached is a short C Program to reproduce the problem.
Process runs as root, changes effective user id to an unknown user id
and creates a file:
/tmp is xfs, /scratch is lustre :
# ls -ld /tmp /scratch/tmp
drwxrwxrwt 9 root root 25600 Jun 3 14:47 /scratch/tmp
drwxrwxrwt. 132 root root 16384 Aug 30 15:06 /tmp
[working for xfs:] # ./debug1_lustre /tmp/testfile && echo success
success
[not working for lustre:] # ./debug1_lustre /scratch/tmp/testfile
/scratch/tmp/testfile: Permission denied
If i change the uid to a known uid, it works.
Is this a bug in lustre?
Mit freundlichen Grüßen
Bernd Melchers
--
Archiv- und Backup-Service | [email protected]
Freie Universität Berlin | Tel. +49-30-838-55905
/*
* gcc -Wall -o debug1_lustre debug1_lustre.c && strace ./debug1_lustre
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <grp.h>
#include <stdio.h>
#include <errno.h>
#include <assert.h>
int main(int argc, char **argv)
{
int rc;
char *filename;
const int UNKNOWN_UID=111111;
if (argc != 2)
return 1;
/* must be root */
assert( 0 == getuid() );
filename = argv[1];
rc = seteuid(UNKNOWN_UID);
if (rc != 0){
perror("seteuid");
return 2;
}
rc = open(filename, O_RDWR|O_CREAT, 0644);
if (rc == -1){
perror(filename);
return 3;
}
return 0;
}
_______________________________________________
lustre-discuss mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org