the fakeroot packages is supposed to allow chgrp and chown on files but does currently not. Reproducible: Always Steps to Reproduce: 1.a user type fakeroot chown root . Actual Results: chown: changing ownership of `.': Operation not permitted Expected Results: that is works like on debian based systems keesj@box:~$ fakeroot chown root . keesj@box:~$ chown/chgrp the coreutil used by gentoo does not use the chown system calls but uses fchownat this is why the calls are not intercepted I have added this method on libfakeroot.c and it seams to help it is not complete yet. int fchownat (int __fd, __const char *__file, __uid_t __owner, __gid_t __group, int __flag){ int fd,st,rt; struct stat file_stat; rt = fstatat(__fd, __file ,&file_stat, __flag); if (fd ==-1){ return errno ; } if (S_ISDIR(file_stat.st_mode)){ printf("FIXME \n"); return 0; } else { fd = openat(__fd,__file,__flag); } if (fd ==-1){ return errno ; } rt = fchown(fd,__owner,__group); close(fd);//always cloase the handle even if rt is invalid return rt; }
make check in a clean fakeroot also fails when changing ownership
fakeroot-1.6.5 is now in portage