I got here from StackOverflow because I couldn't find a solution there. Here is the link to the question.
When I open terminal and type
whoami I get
m1ck0 which is my user. But when I enter
whoami command in PHP
http and this is causing me the problem where I can't make image upload with PHP. It says
Warning: move_uploaded_file(../../images/cart.png): failed to open stream: Permission denied in /srv/http/portfolio/admin/backend/write/blogs.php
I think that this is because I don't have ownership of that folder. But output of
ls -l is
drwxr-xr-x 9 m1ck0 m1ck0 4096 13. nov. at 21:18 portfolio
for the root directory of project and
drwxr-xr-x 2 m1ck0 m1ck0 4096 13. nov. at 21:18 images
for a directory where I want to upload the image to.
Thank you in advance :)
I also tried with an absolute path to the directory and still got the same error.
I am using
OS: Manjaro Linux x86_64