Forum
Bucket Permissions Error
Hi
I'm getting a permissions error with buckets in assets.
I've doubled and doubled checked and all folders and files in the resources folder are all set to 777 but I get this error...
Warning: mkdir(): Permission denied in /home/supreme/433S5G0O/htdocs/cms/core/lib/PerchResourceBucket.class.php on line 123
I can upload to the resources folder (default) but not to any of the folders within resources. It won't even save/use an image that's already uploaded within assets.
I've checked with our hosting and they're happy that permissions are all ok too.
It's only started today after I put the site live. The site was already on the web server when it was in development, the only thing I've changed is to move all the files into the public /htdocs
folder (which is what I normally do without any issues)
Any help would be much appreciated.
Perch: 3.0.8, PHP: 7.0.15, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (3.0.8), assets (3.0.8), categories (3.0.8), perch_blog (5.6.1), perch_forms (1.9)
App runtimes: <?php $apps_list = [ 'perch_forms', 'perch_blog', ];
PERCH_LOGINPATH: /cms
PERCH_PATH: /home/supreme/433S5G0O/htdocs/cms
PERCH_CORE: /home/supreme/433S5G0O/htdocs/cms/core
PERCH_RESFILEPATH: /home/supreme/433S5G0O/htdocs/cms/resources
Image manipulation: GD Imagick
PHP limits: Max upload 128M, Max POST 128M, Memory: 256M, Total max file upload: 128M
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
Resource folder writeable: Yes
HTTP_HOST: supreme-windows.co.uk
DOCUMENT_ROOT: /home/supreme/433S5G0O/htdocs/
REQUEST_URI: /cms/core/settings/diagnostics/
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php
Which user owns the resources folder and ''cms''?
apache
owns all the bucket folders as they were created within Perch.supreme
owns all the other folders.This is normal and has worked on all our other 30+ Perch sites
The message I get on the Perch edit page is
...but the folder is set as 777 with owner as
apache
Try creating the resources folder with the supreme user.
The
/resources
folder is currently setup withsupreme
as the owner. All the bucket folders within/resources
are set toapache
as the owner.We did have all folders and files set to
supreme
but that didn't work either.I've just renamed the bucket in the template tag to
bucket="hero"
and it created a new folder, uploaded and inserted a test image perfectly.I then went to select another image in the existing
/resources/hero-images/
folder and it won't insert the image into the page.Debug from Perch admin page...
Solved.
We've managed to track it down to the paths in the
/config/buckets.php
files, which were incorrect.Updated these paths and problem solved.
Thanks for your help Lexi