I am executing a program from my php script whose output i want to display on the webpage, There are multiple commands which are running based on inputs including some selenium tests,
i use popen("$cmd 2>&1 ; echo Exit status : $?", 'r');
in php .
everything works fine , but during selenium tests i get error as
WebDriverException: Message: 'chromedriver' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
I found that this was caused because the chrome driver was in home folder and the Apache user did not have permission to access it ,
i tried giving it 777 permission and even tried chaning the chown
to the apache user , but nothing seems to have worked ,
The only solution i could get was to place my chromedriver in the html folder and access from there , which was working .
But it seems like a security issue by placing the driver directly inside the public HTML folder .
Is there a way i can get apache to access the chromedriver not in html folder. and what are the possible risks , if i do keep a driver inside the public html folder or give the apache user the permissions directly to apache user?