问题描述
Docker-Desktop使用了WSL2启动了PG数据库,但是数据库没有启动,提示权限错误
chmod: /var/lib/postgresql/data/pgdata: Operation not permitted
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
解决办法
修改下WSL的配置,添加如下内容
#/etc/wsl.conf
[automount]
options="metadata,uid=1000,gid=1000,umask=22,fmask=11"
然后重启wsl
wsl --shutdown