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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-24-2004, 04:53 AM
|
#1
|
|
LQ Newbie
Registered: Nov 2004
Posts: 29
Rep:
|
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.
|
|
|
|
11-24-2004, 04:58 AM
|
#2
|
|
Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131
Rep: 
|
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)
|
|
|
|
11-24-2004, 05:15 AM
|
#3
|
|
Senior Member
Registered: Jul 2004
Location: Nantes (France)
Distribution: Arch Linux
Posts: 1,897
Rep:
|
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.
|
|
|
|
11-24-2004, 05:58 AM
|
#4
|
|
Senior Member
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Rep:
|
How about with chmod? Something like
Code:
chmod ug-rwx <filename>
Is that right?
|
|
|
|
11-24-2004, 07:00 AM
|
#5
|
|
Senior Member
Registered: Jul 2004
Location: Nantes (France)
Distribution: Arch Linux
Posts: 1,897
Rep:
|
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.
|
|
|
|
11-24-2004, 08:04 AM
|
#6
|
|
Senior Member
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:59 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|