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 |
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-08-2001, 12:21 AM
|
#1
|
Member
Registered: Aug 2001
Posts: 73
Rep:
|
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.
|
|
|
11-08-2001, 02:59 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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...
|
|
|
11-08-2001, 06:24 AM
|
#3
|
Senior Member
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368
Rep:
|
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.
|
|
|
11-08-2001, 07:52 AM
|
#4
|
Senior Member
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028
Rep:
|
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.
|
|
|
11-09-2001, 01:09 PM
|
#5
|
Member
Registered: Aug 2001
Posts: 73
Original Poster
Rep:
|
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"
|
|
|
11-10-2001, 03:51 AM
|
#6
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
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.
|
|
|
11-10-2001, 10:21 PM
|
#7
|
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163
Rep:
|
one way would be to simply delete everything except /home
This however would not be much better than the rename idea.
|
|
|
11-11-2001, 02:35 AM
|
#8
|
Moderator
Registered: May 2001
Posts: 29,417
|
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.
|
|
|
All times are GMT -5. The time now is 03:50 PM.
|
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
|
|