From 47a2c6707b2f9a9c42673629b82640122c53a609 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Mon, 6 Jan 2020 14:49:39 -0700 Subject: [PATCH] vfs_gpfs: Print message when share modes are disabled in file system GPFS file systems can be configured without support for share modes. As this results in an unique error code, print a message explaining this situation and the required config changes. Signed-off-by: Christof Schmitt Reviewed-by: Jeremy Allison --- source3/modules/vfs_gpfs.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index a1fc284741d..959d7b5fe20 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -139,6 +139,13 @@ static int set_gpfs_sharemode(files_struct *fsp, uint32_t access_mask, DBG_NOTICE("GPFS share mode denied for %s/%s.\n", fsp->conn->connectpath, fsp->fsp_name->base_name); + } else if (errno == EPERM) { + DBG_ERR("Samba requested GPFS sharemode for %s/%s, but the " + "GPFS file system is not configured accordingly. " + "Configure file system with mmchfs -D nfs4 or " + "set gpfs:sharemodes=no in Samba.\n", + fsp->conn->connectpath, + fsp->fsp_name->base_name); } else { DEBUG(10, ("gpfs_set_share failed: %s\n", strerror(errno))); }