Script to monitor the changes on files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script to monitor the changes on files
# 1  
Old 01-05-2016
Script to monitor the changes on files

Hello all,

I'm planning to write a script to monitor the changes on configuration files on my application server, i have around 50 properties files which really crucial for the application to perform well but we have a challenge here is that all the application team (development, testing and operations team) use the generic credentials which makes my job worse to find the culprit who makes the changes in properties files without informing us (its even difficult to change the password because its a vast application and involves a lot of scripts, changing the password in all scripts is going to be a big project and Application wont work with specific user credentials) we use Citrix connect to application.

I would want a script to notify me as and when the changes are made to any of property file and what has been changed and also IPaddress of the person from where he logged on.

Please let me know if there is any readily available script, that will be great help.
# 2  
Old 01-05-2016
Using plaintext passwords in scripts is a no-go for security reasons.
You 'tell your customers' to 'not write down the password' yet 'you' share them with every script?!

Using credentials (per user) gives you more ability to trace which user(-group) has done what.
Unlike as of now, where everyone using the scripts use the same password/login.

You 'save it all', and set the archive flag (is this valid in *nix like systems?)
Afterwards, all you need to do is to list the files without archieve flag, as that should be removed when the file is changed.

I believe rsync has such a function, to just list (not sync) the files different from last run.
That list could be used to figure differences.

If the projecto cos are git or svn, tell them to do 'commits', so you could see in each project the source change.

My 2 cents, hth
# 3  
Old 01-05-2016
If it is Linux operating system, i would use inotifywait (works on local filesystems only)

Other then that rsync could be used in such manner with dry run option and log file.

Best regards
Peasant.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Script monitor website wth default tomcat script

Hi all, on our application server we have the following script that monitor the status of the website, my problem here is that i have edite the retries from 3 to 5, and the timewait to 120 second, so the script should check 5 times every 2 minutes, and if the fifth check fails it must restart... (0 Replies)
Discussion started by: charli1
0 Replies

2. Homework & Coursework Questions

Need shell script to monitor files

Hi Experts, I am not good in writing script. Just stared. I am looking for shell script to check following parameters. 1) Number of files on remote Linux SUSE server.- Any directory and sub directory. 2) I should define number of files in script. Files should be variable. 3) Age of the... (2 Replies)
Discussion started by: ApmPerfMonitor
2 Replies

3. Homework & Coursework Questions

shell script that can create, monitor the log files and report the issues for matching pattern

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write an automated shell program(s) that can create, monitor the log files and report the issues for matching... (0 Replies)
Discussion started by: itian2010
0 Replies

4. Shell Programming and Scripting

Shell Script to monitor folder and upload found files via FTP

Hi everyone! I'm in a need of a shell script that search for all files in a folder, move all those files to a temp folder, and upload those files via FTP. When the file transfer via FTP completes successfully, the file is moved to a completed folder. In case any of those files fails, the file... (4 Replies)
Discussion started by: pulsorock
4 Replies

5. UNIX for Advanced & Expert Users

Monitor files being copied/accessed

Hello, Is there a way (without 3rd party software) to know if a file has been accessed and/or copied ? I'm interested in any solution : doing command line instructions , running background scripts etc... I apologize if I posted this in the wrong forum. Thank you! (8 Replies)
Discussion started by: prostiiinet
8 Replies

6. Shell Programming and Scripting

monitor log files

Hello, I want something like this tail -f /a/b/c/*.log | grep -i "STRING1|STRING2 " > a.txt I want to check all the log files in a particular directory then grep if any of the log files have "STRING1" and "STRING2" string and then have to send email to the group. Platform is HP-UX it... (8 Replies)
Discussion started by: RTY
8 Replies

7. UNIX for Dummies Questions & Answers

Monitor files

I have just started UNIX administration..I want to monitor files with a specific extensions.. ie, I want to monitor .doc or .DOC files created in particular directory..The script should display (every minute) a list of those filenames created after the previous display. (1 Reply)
Discussion started by: aadi_uni
1 Replies

8. UNIX for Dummies Questions & Answers

Help: script to monitor incoming files

I have 20 or so files that are ftp'd each day to a particular directory. I want to create a script that will tell me if any of these files fails to arrive or if any additional files arrive. I'm thinking I'd have a list of file names that should arrive each day, and the script would check each days... (2 Replies)
Discussion started by: daveyc82
2 Replies

9. Shell Programming and Scripting

script to monitor files in a directory and sending the alert

Hi All, We are having important config files in an directory which was accessable by all /auto/config/Testbed/>ls config1.intial config2.intial config3.inital often we find that some of the lines are missing in config files, we doubt if some one is removing. I would like to write... (0 Replies)
Discussion started by: shellscripter
0 Replies

10. Shell Programming and Scripting

need help doing a script to monitor if files are go through

I am trying to do a shell script to check a folder and see if files are passing through. Now if a file did not pass through in the last 1 hour send an email. ftp----------> folder to monitor ----------->ftp Now the script that moves the file runs every sec in cron, so i do not know if i... (0 Replies)
Discussion started by: jonathan184
0 Replies
Login or Register to Ask a Question