Solved

Question on Directory Permissions

Posted on 2000-05-14
7
265 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 50 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
What is linux 4.8.22? Is it the same as ubuntu 16.10 ?? 2 77
Apache module 5 68
postfix start error! 9 58
Krita v3 Linux Mint/Ubuntu 16.04 9 32
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

696 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