Python: Permission denied error while setting up archive database

947 views Asked by At

I was setting up scheduled backup of my postgresql database on my server using wal-e. I was following this link. (Just have a look at the article from Step 3)
When I execute the below command after initial setup .
sudo -u postgres /usr/bin/envdir /etc/wal-e.d/env /usr/local/bin/wal-e backup-push /var/lib/postgresql/9.5/main.

I get following error:-

 PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/urllib3-1.24.1.dist-info' 

Please help

1

There are 1 answers

0
Akshay Goyal On BEST ANSWER

Faced the same issue. Your postgres user is not able to access the distribution packages.

Try running the below command. It should resolve the issue.

chmod a+xr -R /usr/local/lib/python3.5/dist-packages/*