1
When you issue the command ls in Linux you get this sort of thing:
drwxr--r-- 1 fred editors 4096 drafts
-rw-r--r-- 1 fred editors 30405 file1.php
-r-xr-xr-x 1 fred fred 8460 file2.php
I know that the rwxrwxrwx are the read, write and execute permissions for the current user. And I think I know that 'fred' is the user who owns the file. So I assume fred can write to file1 but no one else can. But what is the extra bit 'editors' and what is the difference between file1 and file2 with respect to one having an ownership of 'fred editors' and the other 'fred fred'?
Also if a web user connects to one of the files, what is their user name and where is this decided? If the server decided that user connecting from the web was going to be fred, does this mean any web user could write to file1?
Any information welcomed, I am resaerching this but just getting confused. Thanks
Thanks, sorry I am new to this so this is probably very basic but where can I look at and change these users and group? – None – 2010-05-18T10:58:34.830
I had a look at /etc/passwd and the user the owner of the files in the wb directory I'm working in is not in the list. – None – 2010-05-18T11:04:51.150
@Columbo, you can use the "groups" command to list the groups for the current user or for a given user. The list of all groups can typically be found in "/etc/passwd". You can use "chown" to change both the owner and the group for a file, while you can use "chmod" to change the permissions for the file. – Michael Aaron Safyan – 2010-05-18T11:05:13.267
@Columbo, some OSs don't rely on /etc/passwd or augment /etc/passwd with a separate user/group database. – Michael Aaron Safyan – 2010-05-18T11:06:10.613
Thanks, the problem I have is the web site files I am working on are user: 2016 group: sites. When I use the command 'groups 2016' i get the reply "ID:2016 No Such User". – None – 2010-05-18T11:09:25.197