Hi All,
This probably isn’t much of a MODx question, but might be a Linux/Apache/permissions thing that I just can’t see the wood for the trees with!
I’ve been experiencing problems in uploading files via Resources > File Manager as well as the FCK Editor when adding images. The File Manager gives the following error when you try to upload a file:
Failed to copy file to destination directory - upload failed! Possible permission problems - the directory you want to upload to needs to be set to 0777 permissions.
This happens on all directories - regardless of whether or not the MODx File Manager says "Directory writable? Yes" just above the file upload form. I’ve checked all this via SSH and the directories are set to 777 permissions. All directories are owned by the FTP user that owns the domain, and with the 777 permissions this has always been more than enough to allow file uploads on other MODx sites I’ve developed on the same server. Even changing the owner to be the same user that the Apache HTTPD process runs as on the server has no effect.
I’ve checked that the admin user has user permissions defined in Security > Manage Users to be able to upload files, file types and write to these directories. I’ve tried using the "use system defaults" checkbox, as well as specifying the directory paths.
I’ve created a separated PHP script, outside of MODx, that uploads to the "assets/images" folder and this works fine. The files that this script writes to this directory are owned by the "apache" user, and can be accessed and modified fine via MODx. But any file uploads via the MODx File Manager and FCK Editor just result in permissions problems.
Think I’ve included all the bits of info here from what I’ve tried to get this working, but more than happy to try anything with getting this working!
Ermm... help!