LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   permissions (https://www.linuxquestions.org/questions/linux-newbie-8/permissions-486309/)

soda99 09-23-2006 02:10 PM

permissions
 
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

MensaWater 09-23-2006 02:23 PM

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.

r=read (value = 4), w=write (value=2), x=execute (value=1).

So rwx = 7, rw- = 6, r-x = 5 etc...

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.)

soda99 09-23-2006 02:39 PM

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


All times are GMT -5. The time now is 04:22 PM.