![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum 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 |
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
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) |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
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. |
|
#3
|
||||
|
||||
|
Quote:
|
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||
|
|||
|
try with ls -lg filename.ext
|
|||
| Google The UNIX and Linux Forums |