1

Error when trying to upload image in Symphony

Destination folder is not writable. Please check permissions on /workspace/images/x

I changed the ownership of "x" directory to apache:apache, even gave it 777 and still get the error.

Website was created and tested in VM, and we were able to upload other images in the same section before moving to the live version. I have tried to upload the same 120kb image that worked before.

EDIT: The similar happens if I try to create page with Blueprints>Pages I get

Page Template could not be written to disk. Please check permissions on /workspace/pages

In addition, on login I get a message

The Symphony configuration file, /manifest/config.php, is not writable

All those files are owned by apache and have 664 and directories 775

Symphony was installed by saving sql from phpmyadmin of local symphony installation and importing it into live server's database; then running /install

Christos Lytras
  • 36,310
  • 4
  • 80
  • 113
Daniel
  • 1,064
  • 2
  • 13
  • 30
  • Are you sure the running user is `apache`? Create a single php script like `/manifest/permissions.php` and put inside `echo "usr: ".exec("whoami").
    ;` and `echo "writable: ".(is_writable(__DIR__) ? 'true' : 'false').
    ;` run it through the browser and check which user the script runs as and if it can write on that directory. Of course the `exec` php command has to be enabled (not inside disabled functions list in php.ini).
    – Christos Lytras Aug 23 '17 at 12:11
  • @ChristosLytras `usr: apache; writable: false`. The htaccess is the default symphony one; same in the working VM. Is there anything else I could try? – Daniel Aug 23 '17 at 16:47
  • Daniel most likely there are no execute permissions on a directory parent inside your application. Check all directories in the path and make sure all have `0755` permissions. For example, if you have your web app inside `/home/user/www/domain.com/application/` then all that directories (`home`, `user`, `www`, `domain.com`, `application`) must have execute permissions and you'll have that by setting to all parent directories `0755` permissions. – Christos Lytras Aug 23 '17 at 16:57

2 Answers2

1

Check if in your production system is enforced with SELinux

sestatus -v

If you have it enabled, you must add your writeable folder to the httpd_sys_rw_content_t context.

check the Allowing ReadWrite Access section in http://www.serverlab.ca/tutorials/linux/web-servers-linux/configuring-selinux-policies-for-apache-web-servers/

corretge
  • 1,751
  • 11
  • 24
0
  1. Check that the user running PHP (apache?) also has permissions to change into each of the directories above the 'x' directory: images, workspace, etc.
  2. Check that there are no ACLs on the 'x' directory that prevent writing by the relevant user.
  3. Look into SELinux if it's enabled. (I don't have anything to offer on this point but apparently it can prevent writing to directories that have been moved in from somewhere else.
David Oliver
  • 2,424
  • 1
  • 24
  • 37
  • I checked that it is correct user, and partent folders ownership and permissions, and there are no ACLs. I also get in symphony admin area message "The Symphony configuration file, /manifest/config.php, is not writable" but it is also owned by apache and has 664 – Daniel Aug 18 '17 at 17:43