skip to Main Content

Laravel: mkdir(): Permission denied – Nginx

Trying to upload a file with opening new folder. But laravel returns error like below. $destinationPath = public_path() . $folderName; if(!is_dir(public_path().'/uploads')) { mkdir(public_path().'/uploads', 0755, true); } $mkdir = mkdir(public_path().'/uploads/'.$unique, 0755, true); $success = file_put_contents(public_path().'/uploads/'.$unique."/".$filename, $file); I used; sudo chown -R…

VIEW QUESTION
Back To Top
Search