Bash file:
#!/bin/bash
mkdir /var/www/html/bash
PHP file:
<?php
exec("/var/www/html/bash.sh");
?>
After I enter localhost/phpfile.php /var/www/html/bash directory Is not created. I tried shell_exec command no results as well. What I'm doing wrong? 
-rw-r--r-- 1 root root 40 Nov 7 18:47 phpfile.php-rwxrwxrwx 1 root root 39 Nov 7 18:46 bashfile.shfiles are in root group so they should have it. Am I wrong?sudo ps aux |grep apacheorsudo ps aux |grep httpdOn my server I getwww-dataSo, to allow it to create directories, I chmod the parent folder 775, thenchgrp www-data /parentdirps chmod and chgrp will also need to be done via sudo