I am trying to run postgres in IBM containers. I just created a volume:
$ cf ic volume create pgdata
Then install it:
$ cf ic run --volume pgdata:/var/pgsql -p 22 registry.ng.bluemix.net/ruimo/pgsql944-cli
After entering the container via ssh, I found that the mounted directory belongs to root:
drwxr-xr-x 3 root root 4096 Jul 8 08:20 pgsql
Since postgres does not allow root to run, I want to change the ownership of this directory. But I canβt change the ownership of this directory:
# chown postgres:postgres pgsql chown: changing ownership of 'pgsql': Permission denied
Can I change the ownership of a mounted directory?
containers ibm-cloud
ruimo
source share