Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

pham_an's avatar

fopen: failed to open stream: Permission denied - In server

Hi guys, I have problem with store file in serve (in local It's ok). fopen(/home/my_web/public_html/public/upload/image/chu_thi_lan_phuong.jpg): failed to open stream: Permission denied

0 likes
3 replies
tisuchi's avatar

@pham_an First of all, check what is the current permission: ls -l /public/upload/

If it is not 755, then try this:

chmod -R 775 /public/upload/
1 like

Please or to participate in this conversation.