LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-07-2010, 01:09 PM   #1
phru
LQ Newbie
 
Registered: Nov 2006
Location: Austria
Distribution: RHEL 4 | HP-UX
Posts: 20

Rep: Reputation: 0
Deny root access to a given file


Hello all,

I would like to know if it is possible to deny the access to a file for root? Would ACL's be a possibility? I have "googled" around but haven't found anything interesting (except SELinux).

I should secure a password file to an important database.

Thanks in advance

Cheers
phru
 
Old 12-07-2010, 01:32 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
It is not possible using normal file permissions.

The only thing that I can think of would be to encrypt the file and not tell "root" the password. However root could still delete the file.
 
Old 12-08-2010, 06:27 AM   #3
Dani1973
Member
 
Registered: Dec 2010
Distribution: Debian testing
Posts: 148

Rep: Reputation: 16
root can always take ownership and change permissions so it wouldn't work.
It's the same on Windows for administrators and I guess it's like that on any OS and always will be.
 
Old 12-08-2010, 08:57 AM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Right - encryption sort of solves this problem.

I say "sort of" because root could always infect your shell or your encryption binaries / scripts / kernel modules / etc. If he's able to capture your key that way, it's game over.
 
Old 12-08-2010, 09:26 AM   #5
chickenjoy
Member
 
Registered: Apr 2007
Distribution: centos,rhel, solaris
Posts: 239

Rep: Reputation: 30
Might want to look into the "chattr" program in this guide. It wont prevent root from reading files; but it just might make it harder for them to modify or delete them.
 
Old 12-08-2010, 09:35 AM   #6
Dani1973
Member
 
Registered: Dec 2010
Distribution: Debian testing
Posts: 148

Rep: Reputation: 16
Quote:
Originally Posted by anomie View Post
Right - encryption sort of solves this problem.

I say "sort of" because root could always infect your shell or your encryption binaries / scripts / kernel modules / etc. If he's able to capture your key that way, it's game over.
Don't know how it exactly works in Linux under Windows for example, if you use encryption for a user account the administrator cannot access that account anymore because the account is encrypted with the users password and if the administrator would reset the users password it would make the user user unreadable and broken.
Personaly I never had to use account encryption.

If a root user was to 'infect' your shell or encryption binaries then you have a more serious security problem ... why did a user with such sick ideas get root access!
 
Old 12-08-2010, 11:06 AM   #7
phru
LQ Newbie
 
Registered: Nov 2006
Location: Austria
Distribution: RHEL 4 | HP-UX
Posts: 20

Original Poster
Rep: Reputation: 0
Thank you all for your replies!
 
  


Reply



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
software to access file system.. how to allow access for non root users? stdcinout Linux - Newbie 8 03-09-2010 12:55 PM
Apache - how to deny access to a file tikit Linux - Server 2 11-11-2009 03:53 AM
How to deny root access to specific user's files haariseshu Red Hat 8 09-04-2009 07:36 AM
root access file edit? qwertyjjj Linux - Newbie 5 08-04-2009 06:33 PM
deny access to certian file type redhatattack Linux - Newbie 4 09-03-2006 09:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:28 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration