-
- 342 Posts
For whatever reason, no matter what MODx Revolution site I'm working on, I stumble on some problem in the system that has no obvious cause. After spending too much time troubleshooting, I'll hop onto the server control panel (DirectAdmin) and find, through the file manager, that some directory (more often than not, it's a cache directory) has permissions or ownerships changed. Directories that I know I've made writable (777) are magically no longer that way. Worse, I find that some directories have changed ownership from the account name to apache.
Whereas my first thought is to blame something about my server configuration (I admint I'm not much of a server expert), I keep wondering if there is something about MODx Revolution I should be looking at first.
So, is there anything about MODx Revolution that can do this kind of thing? Thank you in advance.
Problem happens on various MODx installs, from 2.1.3 to 2.2.6.
PHP Version 5.3.22
-
- 24,544 Posts
I was surprised to find chmod commands in the MODX core. PhpThumb, for example, has one that's hard-coded to 644, and smarty writes cache files using smarty->_file_perms as the value (not sure where that comes from), so maybe MODX is the culprit.
-
- 24,544 Posts
phpSuExec generally likes 755/644 permissions and I think it can help with ownership problems as well, so it might be a solution. Susan Ottwell could give you a more informed answer.
I've never encountered your problem and it may be because all the servers I use are running SuExec or SuPhP.
-
- 342 Posts
Thank you, Bob. I'll look into it further.
I am aware that MODx does some file permissions settings, particularly since you can set the permissions for new files during installation, but I've not yet been able to track down exactly where this gets done.
Even on Cloud servers, I get the occasional cache error, as well as when installing or removing packages, as if the files and/or directories had the wrong permissions. Even on a very stable OSX/MAMP setup I'm getting these:
[2013-03-06 19:02:11] (ERROR @ /revo226/index.php) Error caching lexicon topic lexicon/en/wayfinder/properties
[2013-03-06 19:02:11] (ERROR @ /revo226/index.php) Could not cache resource 5
So something is "off" somewhere, but I have no idea what it could be.