Permissions
Commands
Apache
Databases
The MCHN
100

who owns this file?

-rw-rw-r--. 1 gil centos    18992 Jun  1 17:20 thriveCart-import-test-refund.csv

gil

100

This command changes a user/group ownership

chown centos:centos /path/to/file.log

100

Whats the package name for apache on a centos distribution?

httpd

100
How can I override the database I want to connect with using a host name?

Update your host file /etc/hosts and map the ip to the host name

100

What are the file permissions (numbers) that we should never set any of our files / directories to?

777

chmod 777 file/dir

200

Who can write to this file?

-rw-r--r--. 1 centos apache    18992 Jun  1 17:20 thriveCart-import-test-refund.csv

centos only

200

This ls flag is used to show file contexts

-Z

200

What folder holds the config files for apache on centos?

/etc/httpd/conf.d/

200

This program allows you to connect to a db through the shell

Mysql client

200

What feature did we recently have to re-write because we decided to reinvent the wheel when in initially building it. 

API Authentication

300

What are valid permissions for an SSH file to be able to connect to a host server?

0600

300

Give a command that would change all contents of directory to permissions 775

sudo chmod -R 775 myDir/*

300

How can I check the status of apache?

sudo systemctl status httpd

300

How can I get the IP address from an AWS DB host name

ping the host name


300

If one of the MCHN sites is either very slow or down but the rest of the sites are up. What is the likely cause of this problem?

Sick Node

400

Can apache write to this file? 


-rw-rw-r--. centos apache unconfined_u:object_r:httpd_sys_content_t:s0 config.php

No 

object_r:httpd_sys_content_t

vs 

object_r:httpd_sys_rw_content_t

400

This command is used to change Selinux file contexts

chcon

400

The ability to host multiple domains on a single server is know as:  

Vhosts

400
What type of data requests are allowed on the replica database?

READS only

400

The name of automated infrastructure deployment tool we use to provision the servers on production.

Terraform 

500

Why will this command fail?

sudo chcon -R -t httpd_sys_rw_content_t public_html/myFile.php

-R flag cannot be used on files (only directories)

500

What command and flags would show all files, permissions, groups and file contexts in a directory

ls -lZa

500

What's the name of the main apache configuration file?

httpd.conf

/etc/httpd/conf/httpd.conf


500

What keywords are used to debug a specific query

EXPLAIN ANALYZE

500

Who is the best developer at the MCHN?

This meant to be a joke, hope it worked!