Page 1 of 1

server_db_grants

Posted: Wed Aug 14, 2013 8:05 pm
by mouseweb
Hi there,

I've justed installed a fresh 1.11.7 installation of CMS Made Simple, but can't use the Module Manager because it's giving me the following error:

"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."

PHP Safe Mode is turned off and all the necessary directories are having the right permissions.

I've noticed that there's an error with 'server_db_grants'. The system does not have the right permission. How can I set this to 'true'?

Re: server_db_grants

Posted: Thu Aug 15, 2013 1:34 pm
by velden
That error message indicates write permissions issue or php safe mode is on. It does not check database permissions.

So if php safe mode indeed is off, there is something wrong with the directory permissions. Especially the /modules and /uploads permissions should be checked.

Re: server_db_grants

Posted: Thu Aug 15, 2013 7:35 pm
by mouseweb
That's the weirdest thing: according to the write permissions everything should be working fine.

Here's the system info:

----------------------------------------------
Cms Version: 1.11.7
Installed Modules:
CMSMailer: 5.2.1
CMSPrinting: 1.0.4
FileManager: 1.4.3
MenuManager: 1.8.5
MicroTiny: 1.2.5
ModuleManager: 1.5.5
Search: 1.7.8
ThemeManager: 1.1.8

Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 16000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true

Php Information:
phpversion: 5.3.3-7+squeeze16
md5_function: Aan (Waar)
gd_version: 2
tempnam_function: Aan (Waar)
magic_quotes_runtime: Uit (Onwaar)
E_STRICT: 0
E_DEPRECATED: 8192
memory_limit: 64M
max_execution_time: 30
output_buffering: Aan
safe_mode: Uit (Onwaar)
file_uploads: Aan (Waar)
post_max_size: 16M
upload_max_filesize: 16M
session_save_path: /public/tmp (0755)
session_use_cookies: Aan (Waar)
xml_function: Aan (Waar)
xmlreader_class: Aan (Waar)

Server Information:
Server Api: apache2handler
Server Db Type: MySQL (mysqli)
Server Db Version: 5.1.66
Server Db Grants: Kan geen geldige "GRAND ALL" permissie vinden. Dit kan problemen opleveren bij het installeren of verwijderen van modules. Of zelfs bij het toevoegen of verwijderen van items, zoals pagina's.

----------------------------------------------

And this is the list of autorisation information:

tmp Succes /public/sites/www.******.nl/tmp (0777)
templates_c Succes /public/sites/www.******.nl/tmp/templates_c (0755)
modules Succes /public/sites/www.******.nl/modules (0777)
Bestandscreatiemasker (umask) Succes /public/sites/www.******.nl/tmp/cache (0777)
config_file Succes 0444

Re: server_db_grants

Posted: Thu Aug 15, 2013 8:31 pm
by velden
What about the uploads folder? Can you upload a file to 'uploads' with file manager?

I saw in the code that the moduleManager would give the same error in some other, probably rare conditions. But I'd guess you'd have a lot of problems then.

Re: server_db_grants

Posted: Thu Aug 15, 2013 8:36 pm
by calguy1000
recursively check ALL permissions on ALL files and subdirectories in the 'modules' directory (and probably the uploads directory too).

If one file has its permissions messedup because of manual uploading/editing (manually creating .htaccess files via ftp etc)... then you will get that error.

ModuleManager makes sure it has permission to work on any and all files in the modules and uploads directories. If it finds a single error it will display that message.

Re: server_db_grants

Posted: Fri Aug 16, 2013 7:49 pm
by mouseweb
Thanx for the replies. I've changed EVERY file and directory in the /modules/ and /uploads/ directory to chmod 777, but still got the error.

Is there a way to avoid the error-display and just let me upload and install new modules?

Everything is chmod 777 so there must be something else which causes the error.

Re: server_db_grants

Posted: Sat Aug 17, 2013 7:02 am
by velden
If you know some php you could temporarily add some 'debug' code to the function can_admin_upload() in \lib\misc.functions.php

So you can find out whether that's the check that fails and on what point it fails exactly.

That does not solve your problem, but it should give you a hint where things go wrong.

Re: server_db_grants

Posted: Sat Aug 17, 2013 6:59 pm
by Dr.CSS
It might have to do with the 'owners' of the folders, how did you upload CMSMS for installation..?

Re: server_db_grants

Posted: Sun Aug 18, 2013 6:06 pm
by velden
mouseweb wrote:.... Thanx 'velden' for pointing me to that direction.
I might have pointed you in that direction, it was explicitly not my intention that you changed the code like you did it now.
velden wrote:If you know some php you could temporarily add some 'debug' code to the function can_admin_upload() in \lib\misc.functions.php

So you can find out whether that's the check that fails and on what point it fails exactly.

That does not solve your problem, but it should give you a hint where things go wrong.
Please read this topic
mouseweb wrote:It's very strange but for now it's working.
This feels more like: "My motorcycle brakes are fine again; I removed the red warning light..."

Re: server_db_grants

Posted: Mon Aug 19, 2013 7:58 pm
by mouseweb
You're totally right Velden. It's not a clean way to 'solve my problem', but for some reason all the help I got so far didn't help me to get rid of this problem somehow.

There must be an issue with the server my website is hosted. Therefor I'm gonna take a look at the hosting provider and see if there's something else, a cleaner way, to solve the problem.

Thanx all for so far.