This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master
in repository sanlock.
commit b90eaeb3bcff444e61ef889ad57c61fa3bd35b29
Author: David Teigland <teigland(a)redhat.com>
Date: Tue Oct 17 12:57:22 2017 -0500
sanlock: expand access error message
Make it easier to recognize disk/file permission errors.
---
src/diskio.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/diskio.c b/src/diskio.c
index 4025f94..57fcaa5 100644
--- a/src/diskio.c
+++ b/src/diskio.c
@@ -124,7 +124,12 @@ int open_disks_fd(struct sync_disk *disks, int num_disks)
fd = open(disk->path, O_RDWR | O_DIRECT | O_SYNC, 0);
if (fd < 0) {
rv = -errno;
- log_error("open error %d %s", fd, disk->path);
+ if (rv == -EACCES) {
+ log_error("open error %d EACCES: no permission to open %s", rv,
disk->path);
+ log_error("check that daemon user %s %d group %s %d has access to disk or
file.",
+ com.uname, com.uid, com.gname, com.gid);
+ } else
+ log_error("open error %d %s", fd, disk->path);
continue;
}
@@ -159,7 +164,12 @@ int open_disk(struct sync_disk *disk)
fd = open(disk->path, O_RDWR | O_DIRECT | O_SYNC, 0);
if (fd < 0) {
rv = -errno;
- log_error("open error %d %s", rv, disk->path);
+ if (rv == -EACCES) {
+ log_error("open error %d EACCES: no permission to open %s", rv,
disk->path);
+ log_error("check that daemon user %s %d group %s %d has access to disk or
file.",
+ com.uname, com.uid, com.gname, com.gid);
+ } else
+ log_error("open error %d %s", rv, disk->path);
goto fail;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.