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
Delete the last modified file kingofprussia UNIX for Dummies Questions & Answers 1 06-04-2008 01:37 PM
how to retrieve original contents of a modified file (modified using vi) novice100 UNIX for Dummies Questions & Answers 3 05-31-2007 05:50 PM
ftp most recently modified file ahmedwaseem2000 Shell Programming and Scripting 6 02-27-2007 10:22 AM
File last modified szzz High Level Programming 4 11-05-2003 08:44 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 10-20-2005
mohanprabu's Avatar
Registered User
 

Join Date: Nov 2004
Posts: 16
Question who modified my file!!

Hi EVERYONE!!...

Just a simple (yet critical from my perspective) doubt... I would like to know who had edited my file.. when I use
ls -l
command, I see my ID.. but when I edit using some other ID, I had expected that ID to be shown.. but still
ls -l
shows my ID only..

So, is there any command thru which I can see who had edited my file. I have a serious problem here, since the file has been edited at an "unearthly" time..

Any early responses is highly appreciated..

Thanks in advance..

Regards,
Mohan.

PS: By the way, I cannot, by rule, prevent others from editing (using chmod command)
Reply With Quote
Forum Sponsor
  #2  
Old 10-20-2005
Registered User
 

Join Date: Feb 2005
Location: Limassol, Cyprus
Posts: 3
Unix allows you to give three levels of permissions to the file.
a. Owner
b. Group
c. Others

When we do a ls -lt, the following is a sample output.

-rwxrwxrwx 1 vijay dev 4692060 Oct 13 17:22 core

The above file (core) the owner user is "vijay" and owner group is "dev". (vijay user is part of dev group. also dev group has other users as well).

rwxrwxrwx is the files permissions. The first three 'rwx' corresponds to the 'owner' user. The next three to the 'group' (all users within that group) and the last three is for all others.

So in the above example all (the owner i.e. user vijay, all users belonging to group 'dev' and all others have read, write and execute permissions)

When i change the permission as 'chmod 640 core', the permission becomes 'rw_r_____'. (Note - the owner of the file only can change the permission using chmod)

So now
user 'vijay' has permissions to read and write
all users under group dev have permissions to read
all other users do not have any permissions on the file.


So you can give permissions (if you are the owner) accordingly as to who all (users) can modify the file.

I am not aware of any command in Unix which will give you the user who last edited the file.
Reply With Quote
  #3  
Old 10-21-2005
mohanprabu's Avatar
Registered User
 

Join Date: Nov 2004
Posts: 16
Thumbs up

Quote:
Originally Posted by vijaygoutham
I am not aware of any command in Unix which will give you the user who last edited the file.
Thanks for a elaborated info Goutham... yep.. u seem to be true.. there are no way to find.. and the trouble is that its not possible for me to allocate groups too..
Reply With Quote
  #4  
Old 10-21-2005
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,258
Some versions of unix filesystems support acl - access control lists.

try
man chacl
or
man acl

to see if your system does supprt them. If it does then you can create very fine-grained access control for your files.
Reply With Quote
  #5  
Old 10-28-2005
Registered User
 

Join Date: Oct 2005
Posts: 4
try with ls -lg filename.ext
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:39 AM.


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

Content Relevant URLs by vBSEO 3.2.0