I am trying to deploy on a server I haven’t used before (and currently only have ftp access to) and I am getting errors & images are not loading (possibly because of a permissions issue?).
Site’s home page throws an error when in debug mode: The session storage directory “/var/www/website.com/html/site/sessions” is not writable. When opening up the permissions right up to 777 of the /sessions folder the home page loaded, however without any of the images.
When trying to access the panel I get these three errors:
The /site/accounts folder does not exist or is not writable
The /content folder does not exist or is not writable
The /media folder does not exist or is not writable
Yes, since you could “solve” the issue for the session folder by setting the permissions to 777, the same would happen if you do the same for the other folder. But that’s not really a solution and should never be done because it is insecure.
Instead you should change folder ownership of all these folder to the Apache user, i.e. www-data and make sure that permissions are set to 755/644.
Thanks a lot @texnixe… I accessed the server via SFTP to try and change the ownership but it seems I don’t have the ability to: chown: changing ownership of 'sessions': Operation not permitted
Also tried with sudo however I don’t have the credentials for that either as my user is not in the sudoers file.
Would you recommend that I request hosting to change folder ownership of only these folders to www-data or all folders/files? In the case that you suggest just the folders mentioned, should the change in ownership be recursive to include all sub folders/files?
Also, is it just the “user” that should change or the “group” too?
But if you don’t have the rights on that server (shared hosting?) to perform such commands, then there must be another way, something like cPanel maybe?
At least support should be able to tell you how you can achieve this. After all, its nothing out of the ordinary that the Apache user needs to write to the file system.
Even databased CMS store files in the file system.
Yes, but I’d try to get a more general answer from them how this is supposed to be handled. If you delete the project and upload again, you don’t want to run into the same issue again.