diff --git a/dali/base/dadfs.cpp b/dali/base/dadfs.cpp index 713041951fe..fece27870fc 100644 --- a/dali/base/dadfs.cpp +++ b/dali/base/dadfs.cpp @@ -1379,9 +1379,23 @@ static void checkLogicalScope(const char *scopename,IUserDescriptor *user,bool r SecAccessFlags perm = getScopePermissions(scopename,user,auditflags); IDFS_Exception *e = NULL; if (readreq&&!HASREADPERMISSION(perm)) - e = new CDFS_Exception(DFSERR_LookupAccessDenied,scopename); + { + StringBuffer scopeDescription; + StringBuffer username(""); + if (user) + user->getUserName(username); + scopeDescription.appendf("%s user '%s', assigned access %s (%d)", scopename, username.str(), getSecAccessFlagName(perm), perm); + e = new CDFS_Exception(DFSERR_LookupAccessDenied,scopeDescription); + } else if (createreq&&!HASWRITEPERMISSION(perm)) - e = new CDFS_Exception(DFSERR_CreateAccessDenied,scopename); + { + StringBuffer scopeDescription; + StringBuffer username(""); + if (user) + user->getUserName(username); + scopeDescription.appendf("%s user '%s', assigned access %s (%d)", scopename, username.str(), getSecAccessFlagName(perm), perm); + e = new CDFS_Exception(DFSERR_CreateAccessDenied,scopeDescription); + } if (e) throw e; }