Devam Ediyor

482122 CLI script that will run nightly on servers (Perl preferred)

Hello,

We need a script that will run nightly (using Perl preferred, please post in PMB in what language will this be accomplished)

The script will do the following:

1. Get all the files in "/var/cpanel/users" -- Which should be a list of files, this should be stored in an array.

2. Run the following code for each user (or any code that gets all world writable files/directories): find ~USER \( -perm -a+w \) ! -type l -- The USER should be replaced the user currently being processed

3. If we get output (they have world-writable files):

3.1 Run the following for each file: chmod -R 755 FILE -- where FILE is whatever is the current file

3.2 Get the email from the file "/var/cpanel/users/THEUSER" -- The line is like this in the file : CONTACTEMAIL=THECLIENTSEMAILHERE

3.3 Send an email to the client with the list of files that were world-writable

4. If we don't get any output, do nothing, skip to next user

At the end, it should generate a report of all the users that required modifications and send it to a specified email.

Beceriler: Her şey Kabul, Perl, PHP, Kabuk Betiği, Web Sitesi Yönetimi

Daha fazlasını görün: perl get, find perl, find directories perl, code that, run, report w, cli, perl generate code, php preferred, cli list files, php post array, perl post, skip list, php cli, perl script email output, perl output, perl language, perl client, world list email, perl email output script, cpanel perl, cpanel email script, email output perl script, perl script output email, send output email perl

İşveren Hakkında:
( 4 değerlendirme ) Montreal,

Proje NO: #2228032

Seçilen:

1 gün içinde 35$ USD
(0 Değerlendirme)
0.0