Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
i am trying to restrict user access to files by making him belong just to apache group, issued the following command :
usermod ktouati -g apache
i created a test file:
-rw-rwx--- 1 root apache 7 Jun 11 07:38 test
and i can't see why ktouati can access the "test" file, once in it says permission denied.
thank you for any help!
File type is first bit.
First three positions are for owner rights
Second three positions are for group rights
Third three positions are for others rights.
So owner is root, but ktouati is in the apache group, which has full rights to the file. So opening it isn't a problem. Not sure what you mean by "once in it says permission denied"...what do you mean? What are you doing to test it?
To tell you the truth, you must understand how UNIX file permissions works, first. And it is really too much to type. You can try Evi Nemeth books or "Learn Linux" series DVD, they are very good on explaining this stuff. There are things like sticky bits that play role, also would you like to use a standard unix permission model or extended (they are very different in both design and commands)
In short if user permissions are sufficient, it will ignore all other permissions and so on, but in practice, you really must figure out the way it works because it will affect EVERYTHING you do in Linux.
thanks for all that suggested solutions, actually i was to ask how to check that a user is added to a group.
but i noticed that Ajay is typing the command in a different way that i did: usermod -g apache <username> i did type like this usermod <username> -g apache.
once i typed the command correctly logged out and back in, it's working, thanks Ajay! and you all! but i'm still wondering is there a command to troubleshoot and see if a user is added to a group?