1838195 Members
3721 Online
110125 Solutions
New Discussion

file permissions

 
SOLVED
Go to solution
Chakravarthi
Trusted Contributor

file permissions

Hi all,


Is it possible to find when the file permissions are changed,

Is there any Good Utility ot script which monitors the file system, and intimates when file size changes or file permissions changes.

ALso is there any way i can know when the file was last modified



regards
chakri
6 REPLIES 6
Niraj Kumar Verma
Trusted Contributor

Re: file permissions

Hi,

Visit this site

http://www.ugu.com/sui/ugu/show?I=software.security&F=1111111111&G=Y

you will find a lot of such tools

-Niraj
Niraj.Verma@philips.com
Christian Gebhardt
Honored Contributor

Re: file permissions

Hi
tripwire, samhain, ..
there are a lot of tools

Chris
Christian Gebhardt
Honored Contributor

Re: file permissions

Hi
tripwire, samhain, ...

there are a lot of tools (for free)

Chris
Michael Tully
Honored Contributor

Re: file permissions

Hi,

You could utilise 'swverify'. What this does is look at the permissions of the file and look to see what it was originally when it was installed. To find when is a little difficult after the event, but if you had this in a script that ran frequently through 'cron' then you could see when. Have a look at the man page for further information, as well as doing a search in here for 'swverify'.

HTH
Michael
Anyone for a Mutiny ?
Chuck J
Valued Contributor

Re: file permissions

I guess you could always check the .sh_history file of a user to see if they changed file permissions.

Chuck J
Jean-Louis Phelix
Honored Contributor
Solution

Re: file permissions

hi,

If you wnat just a simple prog, compile this one (save as xxx.c, "make xxx")

Regards,

Jean-Louis.

#include
#include
#include
#include

dispdate(lib, t)
char *lib;
time_t *t;
{
char buf[BUFSIZ];

strftime(buf, sizeof(buf), "%c", localtime(t));
printf(" %-20.20s : %s\n", lib, buf);
}

main (argc, argv)
int argc;
char *argv[];
{
struct stat bufstat;

if (stat(argv[1], &bufstat) != 0)
{
perror("stat");
exit(1);
}
printf("File '%s' :\n", argv[1]);
dispdate("Last access", &(bufstat.st_atime));
dispdate("Last modification", &(bufstat.st_mtime));
dispdate("Last attr change", &(bufstat.st_ctime));
}
It works for me (© Bill McNAMARA ...)