Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

File Size Zero Error


Go to End
Reply


2 Posts   120 Views

Avatar
AD5XJ

Community Member, 35 Posts

7 June 2017 at 8:28am

I have designed a page that has upload attachments ... one image and another PDF.
The data is created in the database, however, when trying to upload a file of either type I get a server error "File Size is zero bytes".
A search of this forum yielded entries that indicate it is a permission issue of site assets folder or assets/Uploads folder. I have checked both and the permissions are correct.
The search on other platforms seems to indicate file size issues are from the PHP5.6 php.ini file settings. Both are correct and set to a value well above the 8Mb default.
The Apache2 log looks like:

[Tue Jun 06 15:11:57.167558 2017] [:error] [pid 26971] [client 192.168.1.73:50192] PHP Warning:  mkdir(): Permission denied in /var/www/html/ss/framework/filesystem/Filesystem.php on line 53, referer: http://192.168.1.70/ss/index.php/admin/pages/edit/show/23
[Tue Jun 06 15:11:57.170810 2017] [:error] [pid 26971] [client 192.168.1.73:50192] PHP Warning:  copy(/var/www/html/ss/assets/Uploads/news-attachments/the-satern-ring.pdf): failed to open stream: Permission denied in /var/www/html/ss/framework/filesystem/Upload.php on line 207, referer: http://192.168.1.70/ss/index.php/admin/pages/edit/show/23

This code also seems to indicate a permission issue. The folders all have the owner as root group as root and drw-rw----, files can be uploaded manually but not through the CMS.

So now where do I look now?

Avatar
AD5XJ

Community Member, 35 Posts

8 June 2017 at 2:30am

Edited: 08/06/2017 2:32am

In addtion to the behavior posted, I have also have noticed that if I try to create new folders from the CMS Files page under the Upload folder, they are not physically created ... just shown in the CMS page.

When uploading to the new folder created, the physical file goes to /assets NOT to the new folder created or to Uploads.

The actual file that gets uploaded to /asssets has owner www-data group www-data with -rw-rw-r-- permissions. Changing the Upload folder to the same permissions does not solve the problem.

In addition, if I manually add new folders outside the CMS with the same permissions and owner as Upload, then run the sync function in the CMS, the new folders appear as documents not folders.

This may not be the same problem as posted originally, however I believe it is related.