Solved

Question on Directory Permissions

Posted on 2000-05-14
7
261 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
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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Fine Tune your automatic Updates for Ubuntu / Debian
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.

856 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