LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-24-2004, 04:53 AM   #1
alnreddy
LQ Newbie
 
Registered: Nov 2004
Posts: 29

Rep: Reputation: 15
How can hide the folders in linux


hi,
How can hide the folders in linux ?
I am able to restrict file or folder access.
but i am unable to hide it. please help me.
 
Old 11-24-2004, 04:58 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
well, actually there is no way but some filemanagers like Nautilus for example (and Konqueror too I think), if not set otherwise, tend to hide every file ("folders" are actually files of one kind too, so they too) that begins with a dot, like

.xinitrc
.hidden_file
.
..

the . (just one dot) file represents the current directory (by doing a "cd ." you get only back to the place you're currently in) and .. (two dots) represent the directory that's one step "up" from you - like /home if you're in /home/user. so these things are files too, and hidden because they start with (or consist of) a dot. so rename a file so that you put one single dot in front of it's name, and some filenamagers will hide it.

still: if you want to see them, there's no restrictions: hiding dot-files is only a habit, and when forced, they can be viewed with every app that's capable of viewing file names, I think (unless some wicked coder has coded otherwise)
 
Old 11-24-2004, 05:15 AM   #3
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Hiding files and folders beginning with a . is a Unix rule. It must be followed by all applications, though, as you say, it is permited to explicitely ask to view them.

But renaming a file/folder by prepending its name with a dot is not always feasible. This can be done with most, but not with files/folders that have special meaning. Examples:
- evolution is Evolution's settings directory. If you change it to .evolution (becomes invisible), Evolution will not run.
- .mozilla is Mozilla's settings directory. If you change it to mozilla (becomes visible), Mozilla will not run.

But not all is lost. If you really want to hide something, while leaving its name intact, there's the GoboHide kernel patch from the GoboLinux project. You have to compile your own kernel, though.

Yves.
 
Old 11-24-2004, 05:58 AM   #4
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
How about with chmod? Something like
Code:
chmod ug-rwx <filename>
Is that right?
 
Old 11-24-2004, 07:00 AM   #5
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
No. This should keep you from:
- Read the content,
- Write (add or remove) files inside,
- X: cross the diretory (go inside or under it).
But this will not keep you from viewing that the directory is there; it will get listed.

Yves.
 
Old 11-24-2004, 08:04 AM   #6
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
I haven't had a need to do this, so I wasn't sure. However, if I try to browse a directory owned exclusively by root, I cannot see its contents. Perhaps, then, it would work if one were to "hide" the chosen directory inside one that has been assigned these permissions. Then, the desired folder to be hidden would be "hidden" as it would be content of the directory with permission restrictions. I know that I cannot recurse a directory owned by root on my system unless I "su" to root. Its a thought.

One who seems to know a lot about security on *nix is chort, who you'll find moderating the *BSD furums here. Perhaps he could help with an idea.
 
  


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
How can i hide the foldersin linux? alnreddy Linux - Software 4 11-24-2004 12:48 PM
Can i hide my ip under linux with adsl modem ? mythief Linux - Security 3 10-26-2004 12:38 AM
How to hide files in Linux bngrhl Linux - Newbie 8 05-23-2004 08:36 AM
Proftpd hide folders Woutermelon Linux - Networking 2 11-17-2003 10:41 AM
How do you hide your IP in Linux? javaarmy Linux - General 2 09-24-2003 09:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:59 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