[問] fakeroot

Is "fakeroot" equal to "su"?
Does "fakeroot" has additional function compared with "su"?

Thanks

評論查看選項

選擇你喜歡的顯示回應的模式,並點選「儲存設定」,以啟用你所做的改變。

It's fakeroot. man fakeroot.

It's fakeroot. man fakeroot. You can only fake a root but you are not root and you can not do anything a root can do. You are not becoming a root just because you fakeroot, you just fake it so you can look like a faked root but you have no right of a real root, only a faked root. Everything is fake in a fakeroot.

Su is not about root it is about "su - Change user ID or become super-user". man su

privilege to run fakeroot?

Does you need a root privilege to run fakeroot?
If you already have root privilege, why have to run fakeroot?

Thanks

Did you man fakeroot?

Did you man fakeroot?

fakeroot is used to cheat som

fakeroot is used to cheat some programs which need to be run on root but you don't want to run it on root.

My question is that if "su" c

My question is that if "su" can do, why Debian needs this command?

fakeroot does not need root p

fakeroot does not need root password.

My answer is that fakeroot is

My answer is that fakeroot is doing total different thing with su. Su don't cheat but really give the root right to the program. If you use su to run the program and the program is coded to do some malicious, then your system will be cracked. But if you use fakeroot, the affect will be limited. Pls read the man page of fakeroot:

fakeroot runs a command in an environment wherein it appears to have
root privileges for file manipulation. This is useful for allowing
users to create archives (tar, ar, .deb etc.) with files in them with
root permissions/ownership. Without fakeroot one would need to have
root privileges to create the constituent files of the archives with
the correct permissions and ownership, and then pack them up, or one
would have to construct the archives directly, without using the
archiver.