On linux, uid_t is a 32-bit unsigned integer, so this is the correct value when you use -2. If you want a specific UID, you need to configure it in Anonymous_uid (or Anonymous_gid for the GID) Daniel On 4/1/19 11:48 PM, 891873395@qq.com wrote:
Hi: I found a question when we use permission "All_squash". We touched a file, and found that the UID and GID of this file is 4294967294. We did not set anonymous UID and GID. But the UID of nfsnobody is 65534 not 4294967294. 65535 is the 16-bit complement of -2 and 4294967294 is the 32-bit complement. So this is a problem of overflow. We shoud set the defalt value to be 0xFFFE. As the Following: diff --git a/src/include/nfs_exports.h b/src/include/nfs_exports.h index abec9d2..d45a939 100644 --- a/src/include/nfs_exports.h +++ b/src/include/nfs_exports.h @@ -54,8 +54,8 @@ * Export List structure */ #define EXPORT_KEY_SIZE 8 -#define ANON_UID -2 -#define ANON_GID -2 +#define ANON_UID 0xFFFE +#define ANON_GID 0xFFFE
#define EXPORT_LINESIZE 1024 #define INPUT_SIZE 1024 _______________________________________________ Devel mailing list -- devel@lists.nfs-ganesha.org To unsubscribe send an email to devel-leave@lists.nfs-ganesha.org