![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| doubt in awk | jisha | Shell Programming and Scripting | 4 | 04-16-2008 01:02 AM |
| doubt about awk | soujanya_srk | UNIX for Dummies Questions & Answers | 2 | 01-10-2008 01:26 PM |
| Pls help for the doubt | ravi.sadani19 | Shell Programming and Scripting | 4 | 04-12-2007 01:51 AM |
| doubt in sed | matrixmadhan | UNIX for Dummies Questions & Answers | 3 | 08-03-2005 08:34 AM |
| doubt it sed | esham | Shell Programming and Scripting | 2 | 03-07-2005 09:52 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
group modification as i had thought - presumed to reflect the group name changes as and when a group is changed,
but as u had said it didn't but managed to bring all the files (new one's and the existing ) under a single group chgrp -R <newgroupname> ~user but still to continue with the doubt, sorry if i am churning out the same stuff. how does the ls manages to list the files with the previous group name (the group to which the user currently doesnt belong) it was in and no wonder how it lists the newly created files after the group change? |
| Forum Sponsor | ||
|
|
|
|||
|
When you create a file the filesystem evaluates your UID (say:4711) and your effective groups ID (say: group 0815) and now writes file xy. Basically the directory entry (the inode) states that user nr. 4711 (whatever his name is) and group 0815 (whatever its name is and whoever belongs to it) owns this file.
THIS INFORMATION NEVER CHANGES (until explicitly done so by chown, etc.). If you delete your user now you will see that an "ls -l" shows a number instead of the name - the user nr of the deleted user account - and if you delete the group you would see a number instead of the groups name too - the file is still owned by user nr 4711 or group 0815, but this user and/or this group does not exist any more and therefore the ls command can't tell you who this should be. If you create a new user with the same user nr as the old user (or a group with the same group nr as the old group) the file will belong to this new user or group - because now there there is a user 4711 (regardless of what his name is) again. If you create a user or group with the same name as before but different UIDs (user numbers) the user/group won't own the file because exactly this connection is missing. If you take an existing group/user and change its name the connection is still there - its done via the UID/GID and this is not affected by the name change. If you change the UID/GID this connection is broken and you do not own the file any more. Clearer now? bakunin |
|||
| Google UNIX.COM |