0
votes

The title doesn't really sum it all up...

I have recently installed ModX Revolution 2.2.4 on an Apache server and I am having complications with the cache folder. Occasionally I have to manually clear the cache folder via ftp, but any files written there are owned by Apache and my account can't delete them. I have tried adding the "new_file_permissions" and "new_folder_permissions" to the system settings, but there is no change. The cache files are always owned by Apache and I have no access via ftp.

Also, files such as the .htaccess and really anything I upload (css etc) are seen as uneditable to modx unless I manually change them to 777 via ftp. I can't change owner and group though.

The server tech can't figure it out. This has come up before on the modx forums but it has never been answered.

2

2 Answers

1
votes

Obviously, this is a server problem.

I had this problem (with an IIS server though), and the host needed to change some of their settings.

Especially, if MODX works on your different host(s).

0
votes

That is the way it is supposed to work, your FTP account does not have permission to write files written by apache, your ftp may be a member of the group but does not have write permission. [needed to delete]. I suspect this is by design for security purposes.

Your new_file_permissions, new_folder_permissions are used for the modx file manager.

So you can do a couple of things:

Run modx under fastcgi, that way the user writing the files should be the same user as the ftp user.

OR

write a little script [you can even stuff it in a snippet] that will delete the cache files for you. [since it will be running as the apache user, it should be no problem.