Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 11-21-2007, 01:28 PM   #1 (permalink)
simple's Avatar
 
True Techie

Join Date: Jan 2006

Location: Earth

Posts: 171

simple

Default locking a file in linux

hey guys i was wondering if i could lock a particular file in linux [by any means available or necessary ] . i had mentioned in an earlier post of mine that i wanted to stop the root owner from accessing my files but nobody had a solution so thats why i am asking this question.
i think you can lock a particular folder in windoze and if you can do it in windoze then linux should do it better...
hope i get some good replies.....
c ya!!
__________________
<A HREF=http://ubanimator.com><IMG SRC=http://img182.imageshack.us/img182/5168/userbar511415cb2.gif><A>
simple is offline  
Old 11-22-2007, 09:21 AM   #2 (permalink)
Nitestick's Avatar
 

Join Date: May 2005

Location: Locked in a dungeon, Perth

Posts: 8,034

Nitestick will become famous soon enoughNitestick will become famous soon enough

Default Re: locking a file in linux

as far as i know there is no way to really lock out root access to a file. the whole purpose of root is that it is practically omnipotent in terms of power over the system. if you want to hide the file then you really need to be the root account, then it can be hidden and locked easily from all other users. using sudo things are simplified and you can integrate access to the file easily into your own account.

i guess as an alternative there is encryption, whereby you are the only one possessing the key. i'm not sure exactly how to employ this but it's an angle to work on
__________________
Get FireFox
Saxon's Blog|Saxon's Forum - CHECK IT OUT!
Fold for tech forums. MY COMPUTER HELPS CURE CANCER!
"Sniffing Powdered Ubuntu CDs Cures Cancer!" - TuxMachines.org

/Q6600@3.0GHz/4GB Kingston DDR2-800/Gigabyte P35-DS3R/Asus HD4850 512MB|Antec TPII 480w1.50TB of Caviar goodnessWinFast DTV-1000TTT Soprano
If I or anyone else have given you good/bad advice, use the scales icon below their name to adjust their reputation accordingly
I'm sorry but I do not accept support requests via IM, email, or personal messages
You can contact me for Forum related issues via PM only.

Quote:
Originally Posted by veedubfreak View Post
MTv happened. That and parents cant beat their children for being drooling leeches on society anymore.
Nitestick is offline  
Old 11-23-2007, 12:19 PM   #3 (permalink)
simple's Avatar
 
True Techie

Join Date: Jan 2006

Location: Earth

Posts: 171

simple

Unhappy Re: locking a file in linux

encryption is just a way to make the file non-human readable. (the root can still delete it!). i thought there would be some utilities or some tricks by which i could lock my data. is there no way that i can block access to a particular file?
c ya!!
__________________
<A HREF=http://ubanimator.com><IMG SRC=http://img182.imageshack.us/img182/5168/userbar511415cb2.gif><A>
simple is offline  
Old 11-25-2007, 08:17 AM   #4 (permalink)
Mak213's Avatar
 

Join Date: Sep 2004

Location: C:\Windows\System32

Posts: 25,657

Mak213 is a name known to allMak213 is a name known to allMak213 is a name known to allMak213 is a name known to allMak213 is a name known to allMak213 is a name known to all

Default Re: locking a file in linux

There is no way to block root access. That defeats the purpose of having the root account. If the root users cant delete it then what is the point of having a root user that has full control?
__________________
R.I.P. Danny L. Trotter
14 Nov 1945 - 4 Sept 2009
Images created by CarnageX | Decaptured...Listen! | Visit Baezware!! | You've been Mak'd! | 儿做好
I do not accept support questions via EMail, PM, IM or my Spaces page! .:|:. This is what happens when an unstoppable force meets an immovable object.
Thanks to all the guys on the staff for your support in my time of need. Hefe you are my personal Hero for your contribution.



<<<< If I help you, or you just like what I said, rep me
Mak213 is offline  
Old 11-25-2007, 06:57 PM   #5 (permalink)
 
Monster Techie

Join Date: Nov 2006

Location: Illinois, USA

Posts: 1,765

CalcProgrammer1 will become famous soon enough

Default Re: locking a file in linux

Why would you want to block root access to a file. If you can't trust him/her with the file, then why should he/she have root access to your machine in the first place? The best practice is to choose your administrators wisely. Don't let those you don't trust have admin access to your PC. Or, if it's someone else's PC, do whatever you need to do on your own PC.
__________________

CalcProgrammer1 is offline  
Old 11-27-2007, 12:32 AM   #6 (permalink)
simple's Avatar
 
True Techie

Join Date: Jan 2006

Location: Earth

Posts: 171

simple

Exclamation Re: locking a file in linux

Quote:
Originally Posted by CalcProgrammer1
Why would you want to block root access to a file. If you can't trust him/her with the file, then why should he/she have root access to your machine in the first place? The best practice is to choose your administrators wisely. Don't let those you don't trust have admin access to your PC. Or, if it's someone else's PC, do whatever you need to do on your own PC.
thanks for the advice but don't you think i would have thought of that.
but apparently from all the posts i have seen i guess one fact is clear that we really cannot restrict access to a particular file by the root user.
however can i hide the file so safely that even if the root does an ls -a in the parent directory still my files won't show??
is this possible?
thanks for your time... c ya!
__________________
<A HREF=http://ubanimator.com><IMG SRC=http://img182.imageshack.us/img182/5168/userbar511415cb2.gif><A>
simple is offline  
Old 11-27-2007, 04:56 PM   #7 (permalink)
 
Monster Techie

Join Date: Nov 2006

Location: Illinois, USA

Posts: 1,765

CalcProgrammer1 will become famous soon enough

Default Re: locking a file in linux

You can hide a file, but it's possible to see it by turning on hidden folders (it probably won't hide in command line utilities like ls). The simple fact is, root users are the master admins of a Linux system. They have access to all files, folders, and devices on the PC.
__________________

CalcProgrammer1 is offline  
Old 11-27-2007, 06:14 PM   #8 (permalink)
farinha's Avatar
 
Super Techie

Join Date: Aug 2007

Location: Portugal

Posts: 311

farinha is on a distinguished road

Default Re: locking a file in linux

I think that the best solution is to compress the file with rar and apply a password on the file, or use a program to encrypt the file.
farinha is offline  
Old 11-27-2007, 08:09 PM   #9 (permalink)
 
Monster Techie

Join Date: Nov 2006

Location: Illinois, USA

Posts: 1,765

CalcProgrammer1 will become famous soon enough

Default Re: locking a file in linux

Encrypting the file will keep it private, backing up the file to a USB key or something that you keep away from other users/online spam or viruses (unlikely) will keep it from being deleted. That's the only thing I can think of to keep a file from other root users.
__________________

CalcProgrammer1 is offline  
Old 11-28-2007, 12:45 PM   #10 (permalink)
simple's Avatar
 
True Techie

Join Date: Jan 2006

Location: Earth

Posts: 171

simple

Default Re: locking a file in linux

thanks...
__________________
<A HREF=http://ubanimator.com><IMG SRC=http://img182.imageshack.us/img182/5168/userbar511415cb2.gif><A>
simple is offline  
 
Closed Thread

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Useful list of Linux websites. tribalsun Linux, BSD, other *nixes & Open Source Software 33 11-30-2008 12:35 AM
WTF is a Bad Block? MikesCreation Hardware Troubleshooting 18 02-24-2008 09:31 PM
seagate 80gigs failing.. acuariano Hardware Troubleshooting 27 08-27-2007 10:43 PM
Another Hijack Log boo HijackThis Logs (finished) 17 06-26-2007 12:30 PM
Want to make the move to Linux for good...advice? BoysNightOut Linux, BSD, other *nixes & Open Source Software 25 05-16-2007 11:40 AM