access denied - PHP move_uploaded_file - Ubuntu LAMP /var/www

后端 未结 3 1620
半阙折子戏
半阙折子戏 2021-01-03 08:22

I realize there is some sort of problem with permissions on either my tmp folder or the images folder I created in the /var/www folder. I know that /var/ww

3条回答
  •  既然无缘
    2021-01-03 08:49

    This solved my problem: http://ubuntuforums.org/showthread.php?t=1842090&s=8b97ec72fe7cd753910f488329a90f0f&p=11239688#post11239688

    tl:dr - I typed this: sudo chown -R www-data:www-data /var/www

    I do not think it was a combination of trying to chmod the chown the tmp directory and this. I think it is just changing the permissions on the /var/www folder where all LAMP files are kept.

    Now the PHP script works and tosses the image file in the directory I made. It would be easier if Ubuntu installed test servers like this LAMP stack in the user directory without having to learn file permissions like I am protecting my files from the nazis' submarines.

提交回复
热议问题