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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi everyone,
im a little confused..hope someone can help me here.
I created 4 users jones,smith,ford,brown. I created 3 groups managers,public,programmers. jones and smith belong to the group managers, they all belong to the public group, and ford belongs to the programmers group..here is where Im a little confused, I created a file called project and I only want the managers group to beable to access it. Not the two groups...Where do I put the permissions. If i put the permissions on the file "project" rw in the group area won't any group I created beable to access it. I still learning lixux...hope someone can help me on this ...thank you.
soda
Putting the "rw" in the "group area" makes it readable and writable by the assigned group. The part your missing is assinging the group to the file.
Do ls -l <filename>
This will show you the permissions for user, group and other, the number of links, the owner (user for permissions) of the file and the group of the file as well as other information. So looking at permissions:
-rwxrwxrwx
The first position would indicate the file type (- = regular file, d = directory, l = symbolic link, c = character device, b = block device etc...). The next 3 describe the permissions for the owner seen on the line. The next 3 describe the permissions for the group on the line and the last 3 describe the permissions for everyone else.
You change the group of a file with the chgrp command. You change the owner with the chown command. (You can set both with chown by typing chown <owner>:<group> <filename> where owner is the owner you want, group is the group you want and filename is the file you want to change.)
thanks for replying...I did what you said and it worked great..all I did was change the permissions group of the file to managers group and it worked...thank you again
bye
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.