ls -l servicesv2.shsed -i 's/\r$//' servicesv2.shchmod +x servicesv2.sh./servicesv2.sh env-example./servicesv2.sh install./servicesv2.sh start./servicesv2.sh statusTo set up proper permissions for the n8n user in your PostgreSQL database, run the following commands:
sudo -u postgres psql -d postgres -c "GRANT CONNECT ON DATABASE postgres TO n8n;"
sudo -u postgres psql -d postgres -c "GRANT USAGE, CREATE ON SCHEMA public TO n8n;"
sudo -u postgres psql -d postgres -c "ALTER SCHEMA public OWNER TO n8n;"
sudo -u postgres psql -d postgres -c "REVOKE CREATE ON SCHEMA public FROM PUBLIC;"Explanation:
- GRANT CONNECT: Allows
n8nto connect to thepostgresdatabase. - GRANT USAGE, CREATE: Gives
n8npermission to use and create objects in thepublicschema. - ALTER SCHEMA OWNER: Changes the owner of the
publicschema ton8n. - REVOKE CREATE FROM PUBLIC: Removes create privileges from all other users on the
publicschema.
💡 Tip: Run each command in your terminal for proper access