Hello! Can you help me with restore default permissions for user groups. After I delete all defaults permissions for unauthenticated users group by mistake, I can’t access web interface of my nav 4.8.6 fresh installation. How can I restore default permissions without access to web interface?
P.S. Sorry for my English and thanks.
On Wed, 26 Dec 2018 09:41:53 +0000 Назаренко Павел Геннадьевич P.G.Nazarenko@mgts.ru wrote:
Hello! Can you help me with restore default permissions for user groups. After I delete all defaults permissions for unauthenticated users group by mistake, I can’t access web interface of my nav 4.8.6 fresh installation. How can I restore default permissions without access to web interface?
All I can say is: Ouch!
To restore the default privileges (for anonymous users, at least), you would need to re-run the following highlighted SQL statements against the NAV database:
https://github.com/Uninett/nav/blob/4.8.x/sql/baseline/navprofiles.sql#L789-...
Some of these may be outdated, or only useful in a development server, since they permit access to static resources that are normally served directly by the web server and not the NAV code in a production situation. At minimum, access to the front page and login page is needed.
If you're on Debian, you should be able to gain access to the NAV PostgreSQL database to enter the linked SQL statements by issuing this command from a root shell:
sudo -u postgres psql nav