How to create a read-only PostgreSQL user
-
Create a new user in PostgreSQL
CREATE USER <username> WITH PASSWORD '<password>';
-
GRANT CONNECT access
Create a new user in PostgreSQL
CREATE USER <username> WITH PASSWORD '<password>';
GRANT CONNECT access
Unable to append to .git/logs/refs/remotes/origin/master: Permission denied
It appears git
was run locally as root
, thus changing the ownership on some of the files tracking the location of the origin
branch.
Fixing the file ownership should resolve the issue:
# run this from the root of the git working tree
sudo chown -R "${USER:-$(id -un)}" .
The error "MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error" occurs when Redis tries to save the database in the background but fails.
One of the scenarios where it's known to happen is when redis was recently upgraded by homebrew.
To resolve the issue, ssimply restart your redis instance:
start new:
tmux
start new with session name:
tmux new -s myname
Here is the order of precedence from least to greatest (the last listed variables override all other variables):
-u my_user
, these are not variables)role/defaults/main.yml
) [1]group vars
[2]group_vars/all
[3]group_vars/all
[3]group_vars/*
[3]import os | |
ROOT_DIR = os.path.realpath(os.path.join(os.path.dirname(__file__), '..')) |
Although headers with underscore are perfectly valid according to HTTP standards, however NGINX does not support it by default. To enable NGINX to accept headers with underscore, add the following directive within the server block of your NGINX configuration.
underscores_in_headers on;
Validate and reload the configuration after making this change as follows:
The situation occasionally arises when you need to determine the user and group a daemon such as nginx
is running as on Ubuntu, you can basically run the following command:
ps aux|grep nginx|grep -v grep
from django.core.management.utils import get_random_secret_key | |
print(get_random_secret_key()) |
- name: Display content of resolv.conf
hosts: localhost
tasks:
- name: Display resolv.conf contents
command: cat resolv.conf chdir=/etc
register: command_output