Pretendroot is an LD_PRELOAD library which overrides some glibc calls, pretending you are root while doing file system operations. The main difference from Debian's fakeroot is that no daemons or other processes are involved, fake ownership and group are stored on the file system, and not in memory, hence it can survive even reboots. This library has been successfully used when building packages for the UHU-Linux distribution. All of its applications are compiled and installed as an unprivileged user. However, there's no need to patch Makefiles; commands such as "install -o root -g mail thisfile ${DESTDIR}/here" work perfectly, and the final packages will have the desired ownership and group.
| Licenses | LGPL |
|---|---|
| Operating Systems | POSIX Linux |
| Implementation | C |
Recent releases


Changes: This release adds support for the *at family of system calls, as well as for getgroups/setgroups. The wrapper script is improved, and a compiler warning is eliminated.


Changes: Properly destroys meta-data of a file that ceases to exist because a rename() call replaces it with a new file. Environment variables are altered in the wrapper script instead of the library, so that they can be freely modified within a pretendroot session.


Changes: A global variable that could cause race conditions for multi-threaded apps has been eliminated. Files that contain the fake ownership were sometimes created with world writable permissions.


No changes have been submitted for this release.