# HG changeset patch # User Timo Sirainen # Date 1246143066 14400 # Node ID c69a1d0a6bd608b524e9b1abaa4e725826774b7e # Parent 9214dd33a2a50fcde139d8452f5c81ac422c5a96 eacces_error_get(): Check also if user had write permissions to the given file. diff -r 9214dd33a2a5 -r c69a1d0a6bd6 src/lib/eacces-error.c --- a/src/lib/eacces-error.c Sat Jun 27 18:01:18 2009 -0400 +++ b/src/lib/eacces-error.c Sat Jun 27 18:51:06 2009 -0400 @@ -135,6 +135,12 @@ test_access(path, R_OK, errmsg) < 0) { if (errno == EACCES) str_printfa(errmsg, " missing +r perm: %s", path); + } else if (!creating && test_access(path, W_OK, errmsg) < 0) { + /* this produces a wrong error if the operation didn't + actually need write permissions, but we don't know + it here.. */ + if (errno == EACCES) + str_printfa(errmsg, " missing +w perm: %s", path); } else str_printfa(errmsg, " UNIX perms seem ok, ACL problem?"); }