Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

"Forbidden" after installing

Questions related to installing, updating, setting up and configuring
faroinsua
Posts: 15
Joined: Sat Feb 01, 2020 4:04 pm

"Forbidden" after installing

Unread post by faroinsua »

Hi,
I managed to install it, imported the sql file changing `root`@`localhost` to CURRENT_USER as the root access is reserved to my hoster. Now I get onto the login screen.
I manage to enter with globeadmin and nu but wherever I click now, the answer is "Forbidden, you dont have access to this resource". Will mysql 5.7. be the prblem?
Any ideas? I´m so happy to have found a web based database system.
:)
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: "Forbidden" after installing

Unread post by kev1n »

403 Forbidden Error: What It Is and How to Fix It:

https://airbrake.io/blog/http-errors/40 ... dden-error

ALso check the PHP log files.
faroinsua
Posts: 15
Joined: Sat Feb 01, 2020 4:04 pm

Re: "Forbidden" after installing

Unread post by faroinsua »

My problem seems to be that my hoster does not accept any user named "root". I have setup an user with the greatest privileges I can asign and entered the user name and password in the nuconfig.php.
But I still get the "Forbidden" popup when I click on any field inside the nuBuilder panel.
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: "Forbidden" after installing

Unread post by kev1n »

Have you checked the PHP log file(s)? Maybe you'll see more details what's going wrong.
faroinsua
Posts: 15
Joined: Sat Feb 01, 2020 4:04 pm

Re: "Forbidden" after installing

Unread post by faroinsua »

I managed to install it. All the errors I had got solved when I bought a new hosting, in this case it was arsys.es
create Database
define database user and password
define globeadmin user and password in nuconfig.php
upload all into root and type domain into browser

thanx.
zuppo
Posts: 12
Joined: Sun Nov 22, 2020 5:18 pm

Re: "Forbidden" after installing

Unread post by zuppo »

I ran into the same problem today. I 'm on a shared hosting with no options to set the permissions of the database-users that I create.
It seems ok now. At least after I unflagged the sql injection detection option on the server and also i the sql-dump of my local database I changed the lines with "CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW" in "CREATE VIEW `zzzzsys_report_data` ...
Fingers crossed ;)
Grz!
admin
Site Admin
Posts: 2778
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5

Re: "Forbidden" after installing

Unread post by admin »

Guys,

I would like to fix this problem too but first I need the new SQL file tested.

If you want to test it, you can find a replacement for the problem nubuilder4.sql with this one here...

https://forums.nubuilder.cloud/viewtopic. ... 652#p22364

Unzip this file and replace the current nubuilder4.sql file and give it a try.


Steven
nac
Posts: 110
Joined: Tue Dec 12, 2017 11:28 pm
Location: Aberdeen, UK

Re: "Forbidden" after installing

Unread post by nac »

Hi Steven,

I tried this on two databases. In both cases I created an empty database and logged in using a non-root account with full privileges.

On the local WAMP (MySQL 5.7.11) and on the shared hosting (MySQL 5.6.41-84.1), the creation of views encounters the permission problem. The tables were created OK.

Code: Select all

/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `zzzzsys_report_data` AS select concat('PROCEDURE:',`zzzzsys_php`.`zzzzsys_php_id`) AS `id`,`zzzzsys_php`.`sph_code` AS `code`,`zzzzsys_php`.`sph_description` AS `description` from `zzzzsys_php` where `zzzzsys_php`.`sph_system` <> '1' and locate('#TABLE_ID#',`zzzzsys_php`.`sph_php`) > '0' union select concat('SQL:',`zzzzsys_select`.`zzzzsys_select_id`) AS `id`,'nuSQL' AS `code`,`zzzzsys_select`.`sse_description` AS `description` from `zzzzsys_select` where `zzzzsys_select`.`sse_system` is null or `zzzzsys_select`.`sse_system` = '' union select concat('TABLE:',`zzzzsys_table`.`zzzzsys_table_id`) AS `id`,'nuTABLE' AS `code`,`zzzzsys_table`.`zzzzsys_table_id` AS `description` from `zzzzsys_table` */
MySQL said: Documentation

#1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation
What I have noticed is that, when using Adminer to dump a database script, it does not insert the 'DEFINER= user@server' . This is part of the Adminer SQL dump file.

Code: Select all

DROP TABLE IF EXISTS `zzzzsys_report_data`;
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `zzzzsys_report_data` AS select concat('PROCEDURE:',`zzzzsys_php`.`zzzzsys_php_id`) AS `id`,`zzzzsys_php`.`sph_code` AS `code`,`zzzzsys_php`.`sph_description` AS `description` from `zzzzsys_php` where ((`zzzzsys_php`.`sph_system` <> '1') and (locate('#TABLE_ID#',`zzzzsys_php`.`sph_php`) > '0')) union select concat('SQL:',`zzzzsys_select`.`zzzzsys_select_id`) AS `id`,'nuSQL' AS `code`,`zzzzsys_select`.`sse_description` AS `description` from `zzzzsys_select` where (isnull(`zzzzsys_select`.`sse_system`) or (`zzzzsys_select`.`sse_system` = '')) union select concat('TABLE:',`zzzzsys_table`.`zzzzsys_table_id`) AS `id`,'nuTABLE' AS `code`,`zzzzsys_table`.`zzzzsys_table_id` AS `description` from `zzzzsys_table`;
It seems that mysqlpump has a --skip-definer option as well. Maybe a solution?

I hope this helps.

Neil
Janusz
nuBuilder Team
Posts: 479
Joined: Fri Dec 28, 2018 1:41 pm
nuBuilder Version: 4.5
Location: Krakow, Poland

Re: "Forbidden" after installing

Unread post by Janusz »

Hi,
Concerning DEFINER and latest test DB from the link.
So in standard nubuilder4.sql (latest or in any other before) DEFINER is not present in the file.
on tested sql from the latest post: the DEFINER is used like: DEFINER=`root`@`localhost`
in my case in nuconfig.php I do not use root so it does not work now and I have an error:

Code: Select all

#1227 - Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
(just for info - it's not a problem specifically for me)

SO the best - in my case - would be NOT to use DEFINER in the initial sql file (I mean to keep current nubuilder4.sql structure)

Historically 2 years ago I was afraid to place root data to the nuconfig.php so I started to use globeadmin instead and I am continuing with it with no issue at all:

Code: Select all

    $nuConfigDBHost                 = "127.0.0.1";
    $nuConfigDBName                 = "nubuilder4";
    $nuConfigDBUser                 = "globeadmin";
    $nuConfigDBPassword             = ".........";
    $nuConfigDBGlobeadminUsername   = "globeadmin";     //-- globeadmin username
    $nuConfigDBGlobeadminPassword   = "..........";             //-- globeadmin password
    $nuConfigTitle                  = "nuBuilder 4";
    $nuConfigIsDemo                 = false;
I use several instances of databases and to make some differences I use different globeadmin names for different DBs like: globeadmin1, globeadmin2, globeadmin3,
(And it prevents as well form mistakes if you switch between them)

AND to be able to import DB form one to the other first in the .sql file I have to modify the globeadmin name for example from globeadmin2 to globeadmin3. Without that I would have:

Code: Select all

#1227 - Access denied; you need (at least one of) the SUPER, SET USER privilege(s) for this operation
(on linux the change of the name is not painfull at all - just one simple script with:)

Code: Select all

sed -i 's/globeadmin/globeadmin5/g' /root/temp/TestDBtemp.sql
I was testing in the past similar setup on one commerially predifined server with mysql (no root access) - and in basic cofiguration it was working fine - but some options were blocked like events for example - and thats why it was just test only - (they are not willing to make any deviation from standard - and just told me if you need something different you need to go for VPS)

Additional isssue is usage of phpmyadmin - I had bad experience with importing DB's - at least in the past there was limitation of file of 2MB if I well rememeber. So initially works fine until the files are small but one day you can have big problem not be able to import your backup for example - thats why I switch to standard command line MariaDB utility for import/export.
If you like nuBuilder, please leave a review on SourceForge
admin
Site Admin
Posts: 2778
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5

Re: "Forbidden" after installing

Unread post by admin »

Hi Everyone,

The problem has been in the wiki's instructions which have now been changed...

https://forums.nubuilder.cloud/viewtopic. ... 371#p22369


Steven
Post Reply