msfdb: `ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: permission denied for schema public` + solution
https://github.com/rapid7/metasploit-framework/blob/8a46b2b1255faaecd6f3f858b2ac1f3a6cb17fd0/msfdb#L268
This line fails with ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR: permission denied for schema public
my fix was
psql --dbname msf --username postgres --command "grant all on schema public to msf"
maybe its worth to include that into msfdb
Hi!
This issue has been left open with no activity for a while now.
We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 30 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.
not stale I guess?
Hi!
This issue has been left open with no activity for a while now.
We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 30 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.
not?
Hi!
This issue has been left open with no activity for a while now.
We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 30 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.
I'll leave this open incase anyone else hits it, potentially we're missing documentation or code improvements to handle this scenario better - will see 🕵️
psql --host db --dbname msf --username postgres --command 'GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO msf'
psql --host db --dbname msf --username postgres --command 'GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO msf'
The problem seems to be that postgres is the owner of each table/sequence - not msf - maybe thats missing in the migration?