LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-24-2002, 09:25 AM   #1
goyome
LQ Newbie
 
Registered: May 2002
Distribution: red hat 7.2
Posts: 5

Rep: Reputation: 0
Question permissions and viewing a directory


Hi,

I'm just trying to change something on my machine to avoid users seeing directory on which they don't have any permission.
Could someone help me to hide to users what they don't have to see

For example, I'd like to hide directory with permission 0 for "other" to every people not in the proprietary group. I mean as if it just doesn't exist.


Thanks for your(s) answer(s).
 
Old 05-24-2002, 09:34 AM   #2
geoffm33
Member
 
Registered: May 2002
Distribution: RH 7.3 - YDL 2.3
Posts: 63

Rep: Reputation: 15
I don't think you can hide a directory from view in the way you want.

If you want to hide directory "b", then the permissions on directory "a" that contains directory "b" needs to have restrictive permissions.

If directory "a" allows for all users to view it's contents, then there is no way to hide directory "b" from view. (It's contents will be safe though)

[ shut up already and answer the question! ]

Create a directory called, say "private" and make it's permissions rwx for owner and group (or whatever perms you require) but leave other blank or 0.

Inside the directory "private" place any directory structure you need and it will only be viewable by owner and group.

Hope this helps

Last edited by geoffm33; 05-24-2002 at 09:35 AM.
 
Old 05-24-2002, 09:36 AM   #3
vfs
Member
 
Registered: Apr 2002
Location: Brazil
Distribution: Slackware
Posts: 184

Rep: Reputation: 30
chmod 700 directory

chmod 600 file

HTH,

vfs
 
Old 05-26-2002, 05:53 AM   #4
Noerr
Member
 
Registered: May 2002
Location: Dalec, HU
Distribution: Redhat 7.3
Posts: 696

Rep: Reputation: 30
another way of avoiding to see it all the time is to rename it with .(dot) in front ie mv private .private + chmod 770.
 
Old 06-11-2002, 11:08 AM   #5
goyome
LQ Newbie
 
Registered: May 2002
Distribution: red hat 7.2
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for your help

As you propose, I tried to play with different combination of permissions and I finally find a way of treating my probleme.

I have created a second directory in which only allowed users could read and then I linked all the content of the first directory in the second one.

I gave rwx to the group 1 on the first directory and only --x to the group2
I then gave rwx to the group 2 on the second directory and none to the other groups
Finally I changed the rights of the content of the first directory to 775 so that the links of the second directory could work right for members of group2

Thanks for your help to a
 
  


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
cdrom viewing permissions une Linux - Hardware 8 06-29-2005 05:31 PM
Folder permissions viewing in Suse 9.1 randon SUSE / openSUSE 2 02-23-2005 11:31 PM
write permissions for directory - not accidently move/deleted the directory linuxgamer Linux - Newbie 10 12-02-2003 03:04 AM
Error viewing mnt directory Zychior Linux - General 22 07-03-2003 06:52 PM
Fast Directory Image Viewing bkeating Linux - Software 8 06-17-2002 08:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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