Permission denied in /public/index.php on line 28 |
permissions on Linux can be tricky . For instance i had a go at serving web content from a folder called "public_html" inside my home folder. I got forbidden you do not have permission ..blah blah. That was because along with other configuration an "executute" permission was needed on my home directory in order for apache to access public_html via my home folder. I did a chmod of 711 on my home folder and that fixed it.
generally you will see on live web hosting that files have chmod of 644 and directories 755. I once did a chmod of 777 on the index.php in public and that gave me a problem, that was fixed by changing permissions to 644. So basically it looks like you are using apache on manjaro and you have sub directories inside /var/www/html i did approach issues with editing code inside apache for slackware and approaches; don't know if it help you but its at : https://docs.slackware.com/howtos:misc:a..._slackware i was also going to add that i start up my apache on slackware manually using # /etc/rc.d/rc.httpd start Now as a Linux user you will note that root is firing up it seems apache daemon; however if i understand it correctly permissions are dropped from root and handed to user "apache" and group "apache" . That is confirmed in /etc/httpd/httpd.conf where it states user : apache and group : apache. Thats a started for knowing who owns stuff in apache. These are my permissions for a CI4 web app directory called basic and located /var/www/htdocs: Code: bash-5.0$ ls -l basic Code: ash-5.0$ ls -l index.php you mentioned using composer. if you use composer as your user account and download to say your home directory, then basically you will have permissions. you can't access apache web root and use composer unless you are using root, in which case you will probably find that the downloaded stuff has root permissions which you don't want, since so as not to mess up apache content in apache, the owner should be apache and group apache. Does that make sense ? |
Messages In This Thread |
Permission denied in /public/index.php on line 28 - by brabus - 02-16-2021, 04:59 PM
RE: Permission denied in /public/index.php on line 28 - by captain-sensible - 02-17-2021, 03:38 AM
RE: Permission denied in /public/index.php on line 28 - by brabus - 02-17-2021, 10:45 PM
|