[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DBD::Pg::st execute failed: ERROR: permission denied for relation...
- Subject: Re: DBD::Pg::st execute failed: ERROR: permission denied for relation...
- From: blck shp <..hidden..>
- Date: Mon, 26 Oct 2009 15:01:55 -0500
OK, first, can you confirm that I am using trunk? The VERSION says it is 1.2.99.
Next, I cannot add a user from admin.pl: "Error! Required input not provided"
I cannot edit data for user I created manually. I try to enter a
password or employee number: "Error! Error from Function: ERROR:
cannot find user "
Nor does it appear user is apart of a group or can be saved to a group.
I would like to start developing and contributing to the project. I'm
a little confused as to where I went wrong. I'm pretty sure I followed
INSTALL as it was laid out. This is basically what I did not including
any dependencies or modules not loaded:
git svn clone https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk/
Created DB:
createdb ledgersmb13
createlang plpgsql ledgersmb13
psql ledgersmb13 < /usr/share/ledgersmb13/sql/Pg-database.sql
Loaded "module" in order:
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Drafts.sql
psql -U ledgersmb -d ledgersmb13 -f /usr/share/ledgersmb13/sql/modules/chart.sql
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Account.sql
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Session.sql
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Business_type.sql
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Location.sql
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Company.sql
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Customer.sql
psql -U ledgersmb -d ledgersmb13 -f /usr/share/ledgersmb13/sql/modules/Date.sql
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Defaults.sql
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Settings.sql
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Employee.sql
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Entity.sql
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Payment.sql
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Person.sql
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Report.sql
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Voucher.sql
psql -U ledgersmb -d ledgersmb13 -f /usr/share/ledgersmb13/sql/modules/admin.sql
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/Reconciliation.sql
Loaded COA:
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/coa/us/chart/General.sql
Replaced with DB name:
sed -e 's/<?lsmb dbname ?>/ledgersmb13/g' Roles.sql > ledgersmb13_roles.sql
Ran:
psql -U ledgersmb -d ledgersmb13 -f
/usr/share/ledgersmb13/sql/modules/ledgersmb13_roles.sql
Created user:
createuser --no-superuser --createdb --no-createrole -U postgres
--pwprompt --encrypted copcguy
Added to tables and set role:
psql -U postgres -d ledgersmb13 -t -c "INSERT INTO entity (name,
entity_class, created, country_id) VALUES ('copcguy', 3, NOW(), 232)
RETURNING name, entity_class, created, country_id;"
psql -U postgres -d ledgersmb13 -t -c "INSERT INTO person (entity_id,
first_name, last_name, created) VALUES (1, 'Nick', 'Burns', NOW())
RETURNING entity_id, first_name, last_name, created;"
psql -U postgres -d ledgersmb13 -t -c "INSERT INTO entity_employee
(manager_id, entity_id, startdate, role) VALUES (1, 1, NOW(),
'copcguy') RETURNING manager_id, entity_id, startdate, role;"
psql -U postgres -d ledgersmb13 -t -c "INSERT INTO users (username,
entity_id) VALUES ('copcguy', 1) RETURNING username, entity_id;"
psql -U postgres -d ledgersmb13 -t -c "INSERT INTO user_preference
(id) VALUES (1) RETURNING id;"
psql -U postgres -d ledgersmb13 -t -c "CREATE OR REPLACE FUNCTION
grant_all_roles(in_login varchar) RETURNS INT as \$\$ DECLARE
role_info RECORD; BEGIN FOR role_info IN select * from pg_roles WHERE
rolname LIKE 'lsmb%' LOOP EXECUTE 'GRANT ' || role_info.rolname || '
TO ' || in_login; END LOOP; RETURN 1; END; \$\$ language plpgsql;"
psql -U postgres -d ledgersmb13 -t -c "SELECT grant_all_roles('copcguy');"
Is this not the correct procedure? What did I miss/not do?
On Mon, Oct 26, 2009 at 2:24 PM, Chris Travers <..hidden..> wrote:
>
>
> On Mon, Oct 26, 2009 at 12:16 PM, blck shp <..hidden..> wrote:
>>
>> I thought it was trunk. git svn clone
>> https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk/
>> right? Please confirm.
>>
>> I read the README, pre-processed the Roles.sql and executed. I did not
>> use the admin.pl. The user I created using the INSTALL which indicated
>> to run the command: createuser --no-superuser --createdb
>> --no-createrole -U postgres --pwprompt --encrypted UNAME, and then
>> INSERT commands to enter into various tables, not the admin.pl. The
>> user I created, does he need to be a member of all the groups? Will
>> this assign permissions, or do I need to do something else? He is not
>> a member of any of the groups ie. lsmb_ledgersmb13__account_all,
>> lsmb_ledgersmb13__account_create, lsmb_ledgersmb13__account_edit,
>> lsmb_ledgersmb13__all_gl, etc., etc.
>
>
> If you did not not assign any groups and did this manually, that is your
> problem.
>
> There are functions you can use to grant to all roles along with queries but
> I would want to know what you want first.
>
> Best Wishes,
> Chris Travers
>
>>
>> I'm looking now and the admin.pl and I do not see an employee number
>> for the user I created (that could be a problem.)
>>
>>
>>
>> On Mon, Oct 26, 2009 at 1:55 PM, Chris Travers <..hidden..>
>> wrote:
>> >
>> >
>> > On Mon, Oct 26, 2009 at 11:41 AM, blck shp <..hidden..> wrote:
>> >>
>> >> Man, do I just have bad luck or what?
>> >>
>> >
>> > This is in trunk, right?
>> >
>> > Sounds like you don't have permissions set up. Try reading
>> > sql/modules/README if you haven't done this first, and
>> > preprocessing/loading
>> > Roles.sql. If you loaded via the admin.pl, then this is unnecessary and
>> > should be complete.
>> >
>> > If you have done this, you need to assign permissions to your user
>> > before
>> > you can proceed.
>> >
>> > Best Wishes
>> > Chris Travers
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> > is the only developer event you need to attend this year. Jumpstart your
>> > developing skills, take BlackBerry mobile applications to market and
>> > stay
>> > ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> > http://p.sf.net/sfu/devconference
>> > _______________________________________________
>> > Ledger-smb-devel mailing list
>> > ..hidden..
>> > https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
>> >
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Ledger-smb-devel mailing list
>> ..hidden..
>> https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Ledger-smb-devel mailing list
> ..hidden..
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
>
>