Table of Contents
Check: File
To get this help: amcli --explain=File.
To add a section in your ini:
- Execute:
amcli --nocolor --explain=File >> example.ini. - edit the
example.iniin a text editor and update the needed values.
Syntax of an ini section
; -----------------------------------------------------------------------------
;
; Plugin File
; Check existing or absent file objects: files, directories, softlinks
;
[<Your check name>]
description="A short description what will be tested"
function="File"
; key 'filename' {string} 🔸(required)
; filename or directory to check
; example: /var/www/myfile.txt
; default: (not provided)
params[filename]=<Your value here>
; key 'exists' {bool} 🔹(optional)
; true = file object must exist (default); false = file object must not exist
; example: true
; default: 1
params[exists]=<Your value here>
; key 'dir' {bool} 🔹(optional)
; If true then check if fileobject is a directory
; example: false
; default: (not provided)
params[dir]=<Your value here>
; key 'file' {bool} 🔹(optional)
; If true then check if fileobject is a file
; example: true
; default: (not provided)
params[file]=<Your value here>
; key 'link' {bool} 🔹(optional)
; If true then check if fileobject is a file
; example: true
; default: (not provided)
params[link]=<Your value here>
; key 'executable' {bool} 🔹(optional)
; If true then check if fileobject has executable permissions; if false it must be not executable
; example: false
; default: (not provided)
params[executable]=<Your value here>
; key 'readable' {bool} 🔹(optional)
; If true then check if fileobject is readable; if false it must be not readable
; example: true
; default: (not provided)
params[readable]=<Your value here>
; key 'writable' {bool} 🔹(optional)
; If true then check if fileobject is writable; ; if false it must be not writable
; example: true
; default: (not provided)
params[writable]=<Your value here>