I cannot create a directory when installing a module
This turned out to be an SELinux issue. SELinux is enabled and running in enforcing (strictest) mode by default in Centos 7 and this will prevent the web user from being able to write to /modules or /files (or anywhere) regardless of the file permissions set. 

To see if you may be having the same problem:

more /etc/selinux/config


This will display the SELinux config file and let you know if it is enabled and what mode it is in. 

The issue can be corrected with the following commands:

sudo chcon -Rt httpd_sys_content_t /var/www/html
sudo chcon -Rt httpd_sys_rw_content_t /var/www/html/sites/default/files
sudo chcon -Rt httpd_sys_rw_content_t /var/www/html/modules
sudo chcon -Rt httpd_sys_rw_content_t /var/www/html/vendor


This will correct the context of the directories you want to grant write permissions on so that Drupal will work without disabling SELinux. For more information see the man pages for selinux and chcon.