Reputation: 5630
I have just set up a new Centos 7 server and uploaded my SilverStripe project via a Capistrano deployment. All is working well except for the file upload where I get a 'Filesize zero bytes' when uploading images.
The assets folder is symlinked to a shared folder outside of the website root.
website
- current
- - (website root)
- shared
- - assets
- - - (uploads)
- - vendor
- - - (composer managed deps)
The file I am uploading is 16kb.
Permissions on all files and directories are set to deployer:apache 755 and permissions on the assets folder has been set to 775 (set it to 777 still with no luck).
There was another post I read that mention php config could be an issue. Here are some of the relevant php settings:
Not sure if there are any others that may be on interest, let me know and I will post them.
Upvotes: 2
Views: 901
Reputation: 1082
This is usually due to permissions on the assets directory.
Change the owner of both the symlink and the folder it is linked to
sudo chown -R deployer:apache assets
sudo chown -R deployer:apache /path/to/assets
You might also need to do sudo chmod g+w assets
and sudo chmod g+w /path/to/assets
to allow other group members to write to your directory.
Upvotes: 2