Sat Sep 19th 2015 11:57:12: Synology NAS - PHP Function fopen() fails on Webserver

Out of the box, when you try and open a file for writing using fopen the function fails with a permissions error such as "Warning: fopen(file.txt): failed to open stream: Permission denied in /volume1/web/index.php"

To resolve this...

  1. Open the Synology Diskstation Control Panel
  2. Click on "Shared Folder"
  3. Click on the shared folder that contains the file your PHP is trying to open for writing.
  4. Click "Edit"
  5. Go to permissions
  6. Choose "Local Groups"
  7. Give the group "http" Read/Write access
  8. Click OK

It then should work


Thanks! Worked like a charm.

Comment by T. Hutchin at 0:00 on Thu 4 May 2017

It worksª


Comment by Beamen at 16:29 on Mon 16 April 2018

Add New Comment

(Never displayed publically)
HTML Tags allowed - <b>bold</b>, <i>italic</i> and <a href="http://...">Links</a>
Type "NoSpam" in Here:


<< Back