Skip to content

5. Configuration

Vasanth Vanan edited this page Dec 3, 2024 · 6 revisions

Note: install.sh automates this process. If you still would like to manually configure, follow these steps.

I. colors.txt

  • The colors.txt file located in sysadmin/templates/ controls the visual representation of file ownership in the directory tree visualization.
  • This configuration allows you to visually distinguish file ownership patterns in your directory structure through color-coded connections.

a. Format

Each line follows this structure:

username: colorname
username: #hexcolor
root: red
admin: #00FF00 
ubuntu: #0000FF
john: #FF0000 
others: #AA00FF

b. Manual Configuration

  1. If you want to add manual colours, add new users by following the format: username: #hexcolor or username: well_known_colorname
  2. Use valid hex colour codes
  3. The others entry serves as the default colour for unspecified users
  4. Colors will be applied to the connecting lines in the tree based on file ownership

c. Recommendation

  • Choose contrasting colours for better visibility
  • Provide red color to root user
  • Keep the file format clean - one entry per line
  • Don't create a new line at the end
  • Restart the application after making changes

II. Helper file Configuration

The application requires specific sudo privileges to modify file permissions using helper script. Configure these using visudo.

a. Format

Add the following line to your sudoers file:

system_admin_username ALL=(ALL) NOPASSWD: /path/to/your/app/sysadmin/helper.sh

b. Manual Configuration

sudo visudo
# type i to edit the file
# add the following line at the end of the file
# Put helper.sh with the owner which is designated as sysadmin:
linuxuserwhoissysadmin ALL=(ALL) NOPASSWD:/file_path/Infinity/sysadmin/helper.sh
# type esc to exit the editor
# type :wq to save and exit

c. Recommendation

  • The helper.sh script must be owned by root: chown root:root helper.sh
  • Set proper permissions: chmod 700 helper.sh
  • Only grant NOPASSWD access to the specific helper.sh script
  • Please don't modify the code for other purposes

Clone this wiki locally