common MAINTENANCE unify error cases
Refs
@@ -1774,8 +1774,8 @@ sr_chmodown(const char *path, const char *owner, const char *group, mode_t perm)
assert(path);
if ((int)perm != -1) {
- if (perm > 00666) {
- sr_errinfo_new(&err_info, SR_ERR_INVAL_ARG, NULL, "Only read and write permissions can be set.");
+ if (perm > 00777) {
+ sr_errinfo_new(&err_info, SR_ERR_INVAL_ARG, NULL, "Invalid permissions 0%.3o.", perm);
return err_info;
} else if (perm & 00111) {
sr_errinfo_new(&err_info, SR_ERR_INVAL_ARG, NULL, "Setting execute permissions has no effect.");
