• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: "Modules folder is not writable" etc, [SOLVED]
PostPosted: Thu Nov 29, 2012 12:40 am 
Offline
New Member

Joined: Wed Nov 28, 2012 11:47 pm
Posts: 3
Hello to everybody. I'm currently building a web site now on actual web server. I tested cmsms on my own computer via MAMP and didn't experience this problem that I'm struggling with now.

When I go to the Modules-section in the admin console, I get the following error message:

Quote:
"The modules folder (and/or the uploads folder) is not writable, if you would like to install modules by uploading an XML file you need ensure that these folders have full read/write/execute permissions (chmod 777). Safe mode may also be in effect."


If I proceed to the Module Manager-page, I get an error message worded a bit differently:

Quote:
"WARNING: Insufficient directory permissions to install modules. You may also be experiencing problems with PHP Safe mode. Please ensure that safe mode is disabled, and that file system permissions are sufficient."


Result is obviously, that I'm not able to add any new modules to my site (particularily gallery was what I needed), I can't upload the xml-files nor add them from a list in the Module Manager. Module Manager actually lets me browse the list of modules in the Available Modules-tab, but the "Status/Action" for all of them is "Cannot download".

The web server has safe mode off, and as far as I can understand from the view my ftp-software provides me, I'm able to see and change the file and folder permissions. For Modules-folder the permissions are currently 777, folders inside it have permissions 705. Same applies to the Uploads-folder. This is also verified in the system information. So I have now ensured that the safe mode is off, and the file system permissions are sufficient, as suggested by the Module Manager error message, so now what? ;D

Somewhere it was suggested that incorrect paths from config.php to these files might result in these error messages, because cmsms might interpret not having sufficient permissions to write to these folders, if it fails to do so, even if the reason in fact was that the folders didn't exist in the place mentioned in the config.php -file. The installation didn't write root_path/url or uploads_path/url -variables to the config-file, it only contained:

$config['dbms'] = 'mysqli';
$config['db_hostname'] = 'localhost';
$config['db_username'] = 'username;
$config['db_password'] = 'password';
$config['db_name'] = 'database name';
$config['db_prefix'] = 'cms_';
$config['timezone'] = 'my timezone';
(obviously with the actual values there...)

Although from what I read i gathered that mentioning root- and upload -pahts isn't necessary, I tried adding those paths to the config. Everething still seems to be working as before, but this unfortunately applies also to the error messages. My additions didn't help. I added something like this:

$config['root_path'] = '/home/username/public_html';
$config['uploads_path'] = '/home/username/public_html/uploads';

Have I formulated these correctly, or do you wiser ones suspect these would be any help anyway? Are there other places than just the config.php that might contain paths to Uploads-folder (or root, or modules), that might be wrong and causing the problem?

Other stuff that I've checked is the System Information, and only red X there is the max_execution_time (value is 10), which at least according to my logic shouldn't have affect on this problem. Permissions-section there doesn't express any distress, everything is marked with the green ok-sign:

tmp /home/username/public_html/tmp (0777)
templates_c /home/username/public_html/tmp/templates_c (0705)
modules /home/username/public_html/modules (0777)
File Creation Mask (umask) /home/username/public_html/tmp/cache (0705)
config_file 0444

The CMSMS version is 1.11.2.1 "Isabela"
Php-version is 5.3.8-pl0-gentoo
Database is MySQL, version 5.1.49, Apache version I actually don't know where to find.

Versions of the installed modules are
CMSMailer 5.2.1
CMSPrinting 1.0.3
FileManager 1.4.1
MenuManager 1.8.4
MicroTiny 1.2.3
ModuleManager 1.5.5
News 2.12.9
Search 1.7.7
ThemeManager 1.1.7

If anyone might have an idea how to solve this issue, I'd be forever grateful.


Last edited by muikunruoto on Thu Nov 29, 2012 10:46 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: "Modules folder is not writable" etc, cannot find cause
PostPosted: Thu Nov 29, 2012 1:00 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 7113
Location: Fernie British Columbia, Canada
Also check your 'uploads' directory to make sure that the http process owner can write there.

The quick test for that is to simply upload a file into the uploads directory via file manager..

_________________
Follow me on twitter
--
if you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
----------------
Don't make me angry..... you won't like me when I'm angry....


Top
 Profile  
 
 Post subject: Re: "Modules folder is not writable" etc, cannot find cause
PostPosted: Thu Nov 29, 2012 9:45 am 
Offline
New Member

Joined: Wed Nov 28, 2012 11:47 pm
Posts: 3
calguy1000 wrote:
Also check your 'uploads' directory to make sure that the http process owner can write there.

The quick test for that is to simply upload a file into the uploads directory via file manager..


Thank you for the suggestion. I did this, and the file upload via the file manager worked like it should. I also tried the "Advanced mode" from the File manager settings, which allowes accessing the whole cmsms file system. With that setting on, I was able to upload a test file also directly to the modules-folder without any problems or error messages. Yet the situation with the Modules remains the same (in a moment of optimism I checked also that in hopes that maybe something would have changed on the server over night. No such luck.:D)

When one tries to upload additional modules via Module Manager, are there any additional places in the cmsms filesystem that http process needs permissions to read or write to that I should check? Could it be a permission problem elswhere, that would manifest itself by displaying error message about the permissions of the Uploads and Modules -folders? Or does the result of this test spark new ideas about what might be wrong? I appreciate any tips or advices anyone might have.


Top
 Profile  
 
 Post subject: Re: "Modules folder is not writable" etc, cannot find cause
PostPosted: Thu Nov 29, 2012 6:27 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 7113
Location: Fernie British Columbia, Canada
The ModuleManager and (other places) call a function called can_admin_upload that performs numerous checks.

it checks if some files can be 'stat'(ed)... if safe mode is enabled, and if it can write to the modules, and to the uploads directory.

You can test this by creating and running a UDT like this;

if( !can_admin_upload() ) { echo "PROBLEM<br/>"; return; }
echo "GOOD<br/>";

_________________
Follow me on twitter
--
if you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
----------------
Don't make me angry..... you won't like me when I'm angry....


Top
 Profile  
 
 Post subject: Re: "Modules folder is not writable" etc, cannot find cause
PostPosted: Thu Nov 29, 2012 10:45 pm 
Offline
New Member

Joined: Wed Nov 28, 2012 11:47 pm
Posts: 3
calguy1000 wrote:
The ModuleManager and (other places) call a function called can_admin_upload that performs numerous checks.

it checks if some files can be 'stat'(ed)... if safe mode is enabled, and if it can write to the modules, and to the uploads directory.

You can test this by creating and running a UDT like this;

if( !can_admin_upload() ) { echo "PROBLEM<br/>"; return; }
echo "GOOD<br/>";


Thank you again for your answer! Today I actually went through some of the php-files, found out that it was "modulenotwritable" and "error_permissions" -errors that produced the messages, and searching the php-files I ended up finding the function can_admin_download, read through it, but didn't know how to test it. I'm a very much of a noob with the system, so it didn't even occur to me that one could actually make a user defined tag for testing it. The test produced PROBLEM.

But then it occurred to me, when I got to thinking is there anything that is not really "normal" with my site: the index-page of my site at the moment is called index2.php. I've put a regular html-page to the root of the web site as index.html just telling the possible random visitors, that the site will launch soon. Didn't really spend much time pondering if there would be a smarter way to "hide" the actual site from the public for the time being, so I did it by file naming. I don't know how many of you experienced cmsms:ers are facepalming right now while reading this, but as you may or may not have already guessed, renaming the index2.php into index.php seems to have solved the issue.

I don't quite get it yet though why the modules didn't work while index-page was something else than index, or actually non-existent from the system-point of view. And particularily why just the modules, everything else worked fine. But hey, I'm noob, I'll get there, through these kinds of events, slowly and painfully..*blush*

But so the issue seems to be solved, and although the reason for the problem was a bit of a surprise (at least for me), I appreciate your help, it did clarify the system for me more, which is always just good. And sorry for any possible trouble.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting