1

I'm using Laravel 9 with NGINX as the web server. I've running storage link command so I can access the storage files, but when I'm trying to access file which is placed inside subdirectory/subfolder in storage folder, I got 404. Any solution for this?

Subfolder File enter image description here

File directly in Storage enter image description here

My Storage Folder Structure

enter image description here

Fyi, I'm accessing it on React App and store the file from API.

aksal
  • 385
  • 4
  • 15
  • seeing your folder and file structure isn't that correct behavior? the file you are trying to access doesn't exist in that folder or are you testing by moving the files to the folder back and forth to test? You are accessing the file that is not in the folder. – Anuj Shrestha Aug 20 '22 at 10:31
  • Ah, I'm sorry for the image. I actually just trying to move the file before I take the picture. Then I moved back to the subdirectory. – aksal Aug 20 '22 at 10:34
  • I just edited the image. Make it clear. – aksal Aug 20 '22 at 10:38

1 Answers1

1

I found the solution. Solved by changing the folder access permissions to 755.

chmod 755 answer_attachments/
aksal
  • 385
  • 4
  • 15