Permalink
Browse files

better debian-perm error message

git-svn-id: svn://svn.caucho.com/resin/trunk@7440 9c94448d-38f1-0310-a231-d98308ff1ebf
  • Loading branch information...
1 parent fadcfd4 commit dcd5c693c14254397cd568df260a751334ac6275 emil committed Aug 24, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 c/debian-perm.c.in
View
@@ -4,6 +4,8 @@
#include <sys/stat.h>
#include <dirent.h>
#include <pwd.h>
+#include <errno.h>
+#include <string.h>
static void
chown_rec(char *path, int uid, int gid)
@@ -13,7 +15,8 @@ chown_rec(char *path, int uid, int gid)
char buf[2048];
if (chown(path, uid, gid) < 0) {
- fprintf(stderr, "can't chown %s\n", path);
+ fprintf(stderr, "can't chown %s to uid(%d)/gid(%d): %s\n",
+ path, uid, gid, strerror(errno));
return;
}
lchown(path, uid, gid);

0 comments on commit dcd5c69

Please sign in to comment.