Skip to main content
others having the same problem 'with you' and other having the same problem 'as you' are two very different things
Source Link

Imagine that you are a developer/package maintainer, etc. working on a remote server. You want to update the contents of a package and rebuild it, download and customize a kernel from kernel.org and build it, etc. While trying to do those things, you'll find out that some steps require you to have root rights (UID and GID 0) for different reasons (security, overlooked permissions, etc). But it is not possible to get root rights, since you are working on a remote machine (and many other users have the same problem withas you). This is what exactly fakeroot does: it pretends an effective UID and GID of 0 to the environment which requires them. 

In practice you never get real root privileges (in opposite to su and sudo that you mention).

Imagine that you are a developer/package maintainer, etc. working on a remote server. You want to update the contents of a package and rebuild it, download and customize a kernel from kernel.org and build it, etc. While trying to do those things, you'll find out that some steps require you to have root rights (UID and GID 0) for different reasons (security, overlooked permissions, etc). But it is not possible to get root rights, since you are working on a remote machine (and many other users have the same problem with you). This is what exactly fakeroot does: it pretends an effective UID and GID of 0 to the environment which requires them. In practice you never get real root privileges (in opposite to su and sudo that you mention).

Imagine that you are a developer/package maintainer, etc. working on a remote server. You want to update the contents of a package and rebuild it, download and customize a kernel from kernel.org and build it, etc. While trying to do those things, you'll find out that some steps require you to have root rights (UID and GID 0) for different reasons (security, overlooked permissions, etc). But it is not possible to get root rights, since you are working on a remote machine (and many other users have the same problem as you). This is what exactly fakeroot does: it pretends an effective UID and GID of 0 to the environment which requires them. 

In practice you never get real root privileges (in opposite to su and sudo that you mention).

Source Link
sakisk
  • 2.9k
  • 1
  • 24
  • 18

Imagine that you are a developer/package maintainer, etc. working on a remote server. You want to update the contents of a package and rebuild it, download and customize a kernel from kernel.org and build it, etc. While trying to do those things, you'll find out that some steps require you to have root rights (UID and GID 0) for different reasons (security, overlooked permissions, etc). But it is not possible to get root rights, since you are working on a remote machine (and many other users have the same problem with you). This is what exactly fakeroot does: it pretends an effective UID and GID of 0 to the environment which requires them. In practice you never get real root privileges (in opposite to su and sudo that you mention).