?
Solved

Question on Directory Permissions

Posted on 2000-05-14
7
Medium Priority
?
273 Views
Last Modified: 2013-12-06
I'm running Mandrake 7.0 with multiple users.  Most of my directories, such as /home are owned by root who has rwx privileges, and the group is also root (consisting of 1 user, root).  The root group has r-x privileges, and finally all other users have just x privilege.

My understanding of privileges is that a regular user, since he has only x privilege can cd into the directory but cannot ls.

This does not seem to be the case with root root ownership.  A regular user is able to list all the files in that directory.  (Again the privileges are
drwx r-x --x, root root).  The only way I seem to be able to prevent this is to give the root group just x privileges, e.g. (drwx --x --x)

Can anyone explain this?  Why does the root group permissions affect regular non-privileged users?

Thanks,

David
0
Comment
Question by:dschneider
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 2

Expert Comment

by:ksemat
ID: 2809635
I haven't used mandrake but what I know is that on some systems to be able to execute one must have read permissions as well it may be that those who designed the system made it such that once you give execute permissions then it automatically gives read permissions I am just guessing.
0
 
LVL 1

Accepted Solution

by:
tadams earned 200 total points
ID: 2812635
Are you sure you are doing an ls with another user, and not root?  This seems completely impossible to me.  If the directory only has x permissions for other, then any one other than root would only be able to cd into that directory.  Also make sure that the directory you are changing permissions on is infact the /home directory.  I know this may seem kind of silly, and I don't think you are stupid, but all of us make silly mistakes and do something else other than what we meant to.

And last, the Mandrake kernel should be identical to all other linux distributions as far as I know.  And since the kernel is the same, the file system should work the exact same way.  I used Mandrake 7.0 for quite a while, and I didn't notice very many differences from Red Hat 6.1 which is where Mandrake was derived from.
0
 

Expert Comment

by:aramo
ID: 2812813
Some distros avoid the user group; to which all users normally belong; as a security feature. I do not know why group=root is used though.

On the practical side if users can logon and create new files in their home directory something other then the 751 setting is at work. I'd suggest logging in as yourself and root using two ttys/v-consoles

As you - login, check your in home dir, create new file
As root - login, cd /homes check permisssions on your home dir, cd your home dir, check permissions on files

Can you post results as it is a curious setup (to a slakwarer anyway)
0
WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

 

Author Comment

by:dschneider
ID: 2813016
Dear Tadam,

I logged into my server as an unprivileged user. Changed to the / directory.  I could list the subdirectories. Most had the following permissions:

drwxr-x--x root root

I could cd into any subdirectory with that permission and also list all files and subdirectires within that subdirectory.

If I changed the permission to

drwx--x--x

I could cd into that directory, but no longer could use ls.  Could be doing something silly, but it's not obvious.

David
0
 
LVL 1

Expert Comment

by:tadams
ID: 2813034
Ok then.  What about two groups being assigned the same id number then?  Maybe the root group has the same GID as another group.  See the numbers on the same line as the group you are looking at in /etc/group.
0
 

Author Comment

by:dschneider
ID: 2813079
I'm sorry to say that Tadams was right.  I did something extremely silly.  I thank you all for helping me.  

David
0
 
LVL 1

Expert Comment

by:tadams
ID: 2814115
Don't sweat it, we all do silly things once in awhile.  Just be sure to be very carefull when editing files directly.  If you are going to add a group, you can use groupadd.

There's also a program to add a user to a group, but I never use it so I've forgotten what it is called.
0

Featured Post

TCP/IP Network Protocol Cheat Sheet

TCP/IP is a set of network protocols which is best known for connecting the machines that make up the Internet. The truth is that TCP/IP is one of the oldest network protocols and its survival is mainly based on its simplicity and universality.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Fine Tune your automatic Updates for Ubuntu / Debian
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month9 days, 13 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question