Solved

Question on Directory Permissions

Posted on 2000-05-14
7
240 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now