LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-09-2011, 05:28 PM   #1
linutzy
LQ Newbie
 
Registered: Jul 2005
Posts: 17

Rep: Reputation: 0
General Fakeroot Question


I did a standard Google search, and it usually just came up with the man pages, which is fine, but I could use more insight.

Why use fakeroot when you already have root privileges/password?
 
Old 06-09-2011, 07:51 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Wheezy (Fluxbox WM)
Posts: 1,363
Blog Entries: 52

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
There are a few situations where it is useful to be able to preserve the ownership properties of a file. These include making archives, backups, building a kernel, and so on.

In a context where you already have the ability to access root privileges, you can of course just perform the action as root user. So why not?

1. Every action that is performed with root privileges is a potential security issue. In general, the less code that runs with root privileges the better.

2. Some actions (especially backups) are scripted. Where these scripts are automated, then running as root would mean giving them automated access to the root account. However, providing a script with automated root login (eg using sudo) requires very careful thought to prevent abuse; easier just to use fakeroot and know there is not a problem.

3. When creating copies of various system files with all their properties, fakeroot will still be excluded from access to those that are readable only by root. In other words, a backup or archive done as root user may expose sensitive information (such as unencrypted passwords and private keys).

Of course, there are many actions where fakeroot is not useful, but for the few situations where it is, it is a neat way to keep from having to escalate privileges.

Last edited by neonsignal; 06-09-2011 at 07:54 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Java, but fakeroot not working SuperDude123 Linux - Software 4 08-11-2009 06:04 PM
building dpkg fakeroot windsurfer Debian 3 06-29-2007 05:00 AM
current + fakeroot Speek Slackware 6 04-15-2007 08:49 AM
fakeroot problem finrod_2002 Linux - Software 2 03-16-2005 03:23 PM
ioperm - operation not permitted when using fakeroot Zotty Programming 3 09-21-2004 04:34 PM


All times are GMT -5. The time now is 05:22 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration