Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Isn’t faker dangerous? If I create a file with the suid bit and rx perm, the file will be created owned by root, executable by anyone, as root! Or maybe setting the suid bit won’t work? Commented Oct 3, 2014 at 21:14
  • 7
    No good. I tried this out myself. Primary reason for fakeroot is to get ownership root:root into built packages without actually being root. installed packages will have proper perms, though. Commented Dec 16, 2014 at 14:38
  • 2
    It was all very confusing until I read @ntzrmtthihu777's comment! Commented Jan 7, 2015 at 20:24
  • 2
    Sorry, I don't understand the description. Why not patch the tools so that they won't complain if you are not root? As a related question: After all, the files that you create under fakeroot are not actually owned by root. Wouldn't this imply that when I install such a .deb file, all my /usr files are owned by whoever user called fakeroot? Commented Oct 12, 2018 at 13:32
  • 3
    @JohannesSchaub-litb, no that's the point. The files are not owned by root, but inside a fakeroot shell, they look like they are. When the .deb package is created inside this shell, the file owner is read from the file system (which fakeroot intercepts and returns root) and stored in the package. When installing the package, dpkg then requires root access because the package indicates the file should be owned by root. Commented Aug 16, 2019 at 6:12