The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
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

Reply
 
LinkBack Thread Tools Display Modes
  #8 (permalink)  
Old 12-12-2005
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,448
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?
Reply With Quote
Forum Sponsor
  #9 (permalink)  
Old 12-13-2005
Bughunter Extraordinaire
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,001
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
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:11 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0