LinuxQuestions.org
Visit Jeremy's Blog.
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-08-2001, 12:21 AM   #1
Will
Member
 
Registered: Aug 2001
Posts: 73

Rep: Reputation: 15
Hiding directory tree except for 'home'


Is it possible to hide the entire directory tree from a user?

I tried it by placing the dot infront of the /usr directory the other day but unfortunately MD would not work after that.

Is it possible to hide everything except for say 'home' on a single machine and if so how would I do it?

also can it be done on a network? so all the user sees is just his/her home directory.
 
Old 11-08-2001, 02:59 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you can't remane a system directory... that's just plain daft! sorry! i really don't think you can hide everythign in sight, but why would you need to? users will need to be able to see /usr/bin etc.. in order to run programs that are inside it. any particular subdirectories under that you know should never be used by users, you can make sure they have no read access, but hiding something from the user, generally involves hiding it from their useraccount too, meaning they won' be able to do anything. I'm pretty suer that you can remove non-root read access to /etc should be ok, but then you're just not really meant to, users still can't see a file if it's not got 'other' access rights.

Maybe you're really after a higher level approach like samba or a better gmc setup so in the gmc gui you default to the /home level...
 
Old 11-08-2001, 06:24 AM   #3
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 64
I think I know what he's on about. Under Win you can 'hide' files and directories. Obviously if you go to 'show all hidden files' you will be able to see them, but otherwise... Basically, although the dir maybe hidden to the user, the system can still see into it and so program will still run? Am I right? If this is the case, then worry not. Under Linux, the files have an owner as well as other attributes. Therefore, a user may be able to see a file (such as the files under /usr), but will not necessarily be able to do anything with them. If there are any specific files (and by that, I include directories) that you do not want someone to view, use konqueror (or whatever, it's easier than using the prompt at this point) as root, view the properties for the file/dir and disable some of the options. Be warned though, this is not normally a sensible idea.
 
Old 11-08-2001, 07:52 AM   #4
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
Use great caution when removing rights to files and directories outside the users home directory.
Some files need to be world readable or else some programs won't work.
For example the web page files need to be world readable.
 
Old 11-09-2001, 01:09 PM   #5
Will
Member
 
Registered: Aug 2001
Posts: 73

Original Poster
Rep: Reputation: 15
I was curious on hiding everything from the user except the home directory, so that a user would only be able to run and see what's linked to his or her desktop and home directory. Even as is without permission they can't do much if they go snooping, but I was interested to see if it could be done.

Like they say "Ignorance is bliss"
 
Old 11-10-2001, 03:51 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
no, you can't do that at low level, you can do it in X i'm sure.. but linux really doesn't go in for the windoze covering-people-in-cotton-wool ethos.
 
Old 11-10-2001, 10:21 PM   #7
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
one way would be to simply delete everything except /home


This however would not be much better than the rename idea.

 
Old 11-11-2001, 02:35 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3621Reputation: 3621Reputation: 3621Reputation: 3621Reputation: 3621Reputation: 3621Reputation: 3621Reputation: 3621Reputation: 3621Reputation: 3621Reputation: 3621
well, there's 2 other ways, the restricted bash shell (rbash) and chroot. rBash restricts access to the ~/ only, so no subdirs even :-]. Chroot forces the user to ~/ with subdirs, but you have to set up all the system binaries/libs/configs IN the userdir because it cannot access /...

But like one of the previous replies sed, hiding isnt necessary because of the permissions Linux enforces on dirs/files.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
help: regarding comparing two directory tree structures raj_thota Linux - Software 2 11-02-2005 12:19 PM
Help: regarding comparing two directory tree structures raj_thota Solaris / OpenSolaris 1 11-02-2005 07:16 AM
permissions for directory tree adamwenner Linux - Security 3 10-23-2004 07:39 AM
Help! How do you delete a directory tree? johnmcollier Linux - Security 0 10-24-2003 02:29 AM
Directory Tree Question GreatMilenko Linux - Security 3 06-02-2002 01:48 PM

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

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