LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-05-2008, 09:14 PM   #1
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Rep: Reputation: 15
Exclamation Hiding the files


Hi Friends,

How can we hide a file so no one can see that file even root?

If we can rename the file with .(dot), we can list them using ls –la, so it will not work.

Thanks for your cooperation!!
 
Old 11-05-2008, 09:15 PM   #2
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Why would you want to do such a thing?
 
Old 11-05-2008, 09:29 PM   #3
AuroraCA
Member
 
Registered: Jul 2008
Location: Northern CA USA
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370

Rep: Reputation: 35
If you are using Ubunutu 8.10 you can use the new Encrypted Private Directory to keep your files private.
 
Old 11-05-2008, 09:58 PM   #4
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Original Poster
Rep: Reputation: 15
Actually I am writing a script in which there will be some files and I want to put them on hide and using redhat linux.
 
Old 11-05-2008, 10:57 PM   #5
dv502
Member
 
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
Quote:
Originally Posted by JATA01 View Post
How can we hide a file so no one can see that file even root?

Don't misunderstand what I am going to say, but what you are asking to do is something hackers/crackers would do to cover their tracks. You want steps to hide your script and file(s) from root as well.

You can do what AuroraCA said, create a encrypted private directory or you can create an encrypted tar file. Hiding a .dot directory or .dot file is not that simple, especially from a knowledgeable root user.

- Cheers

Last edited by dv502; 11-05-2008 at 10:59 PM.
 
Old 11-05-2008, 11:15 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Just a word of advice, and I hope you take it constructively. If this is in a work environment, I wouldn't even try to hide things from the administrators. Companies have a habit of feeling very strongly about this sort of thing when they find it. If it's something that doesn't belong on the server, then it simply doesn't belong there. If it's work-safe but you have some valid reason that you don't want anyone to know about it, then I'd discuss it with your supervisor anyway. Maybe he will have a suggestion for you. If it's on a school server, then you should consider the same issues.
 
Old 11-06-2008, 12:53 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by JATA01 View Post
Hi Friends,

How can we hide a file so no one can see that file even root?

If we can rename the file with .(dot), we can list them using ls –la, so it will not work.

Thanks for your cooperation!!
By definition, root has god-like powers. If you had such privilege, then you would be more powerful than root, and that would be a paradox.
 
Old 11-06-2008, 01:11 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
JATA;

If you don't want to tell us why you want to hide something from the root user (AKA the administrator---ie the person who is responsible for the computer), then noone should really be helping you.

Please tell us what you are up to and specifically why you would need to hide something from the administrator.
 
Old 11-06-2008, 03:22 AM   #9
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
It is not really possible. The only way to hide them is to rename them with '.' at beginning, but then they are still there and you can list them. To do what you want is not possible, because you would never be able to find them again as anyone. Think about it and maybe you'll understand. If you hide the files and nobody can see them, how do you get them back ? I guess deleting the files would be what you want, that would satisfy all your conditions. Then you could attempt to recover them with something like foremost.
 
Old 11-06-2008, 07:39 PM   #10
JATA01
Member
 
Registered: Nov 2007
Posts: 207

Original Poster
Rep: Reputation: 15
Thank you all !!

I just got an idea, if we hide some files from our other resources even root. They will not see them, only they can able to execute.
 
Old 11-06-2008, 10:09 PM   #11
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
sooo....
chown someuser:someuser donotopen.txt
chmod 300 donotopen.txt
???

root can do anything though... and an administrator may be able to do anything (depending on if they have a special group or if they have root powers.)

If you are concerned about readability for privacy reasons... you can always just store it on a flash drive.

BUT if you really want to be sneaky AND you have root powers AND you want it to persist

create a swap file (file not partition)
some how restrict the swap system from using it
encrypt the data stream then 'dd' it into the swap space.

This would give you a prealocated space of a predefined amount where you can store and retrieve encrypted data from that is pasted it with any type of format and space you want. Nobody can simply read the swap space short of viewing it in hexadecimal, it's encrypted, and the format is unknown.

the previous post was right though... what you want is something a virus or a hacker would do. Coincidently, this is something windows does on a regular basis with desktop.ini files I guarantee you, the number of desktop.ini files you can find with linux viewing the ntfs partition will outnumber the amount you can find using the gui search in windows. Not to mention the recycling bin! don't get me started on that!
 
Old 11-06-2008, 10:19 PM   #12
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
I don't know what do you think you found. But root is root. Period. It can do anything, and that includes seeing every file, and being able to restore and change permissions for any file.

If your concern is privacy, look into encryption. Then you are going to be sure that unless they have your key they can't decrypt the file to look inside. However, that will probably annoy them, and they could just delete any encrypted file they find around without any warning as well.

Last edited by i92guboj; 11-06-2008 at 10:21 PM.
 
Old 11-06-2008, 10:57 PM   #13
wit_273
Member
 
Registered: Mar 2007
Location: Nebraska
Distribution: CentOS
Posts: 82

Rep: Reputation: 15
Decided to delete this message
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hiding files on Desktop girish_hilage Linux - Desktop 5 06-18-2008 01:25 PM
Hiding Image Files In Web Server breadfan311 Linux - Server 7 05-13-2007 07:29 PM
Hiding downloadable files vxc69 Programming 7 10-26-2006 01:17 PM
Nautilus filter hiding files. Cant get them back ! Morg0 Linux - Desktop 0 08-30-2006 08:58 PM
Hiding files from users TomalakBORG Linux - General 3 02-04-2006 04:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:36 PM.

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