Docker NFS Mount Permission Issues on Raspberry Pi
Problem Description
Attempting to access an SSD connected to Raspberry Pi 1 running an NFS service, permission issues were encountered when trying to run a Docker container on Raspberry Pi 2.
Troubleshooting Steps
-
Check Ownership and Permissions on NFS Server (rp1): Verify that the export directory
/home/shashank/ssd
has the correct ownership and permissions: -
Update Ownership: If necessary, change the ownership to the user that runs the Docker daemon on rp2:
-
Inspect Docker Networks: List all Docker networks available on rp2 and inspect the default bridge network to obtain the IP address range:
-
Update NFS Exports Configuration: Modify the
/etc/exports
file on the NFS server (rp1) to allow the Docker network range access:Apply the settings and restart the NFS server:
-
Run Docker with Privileged Flag if Necessary: Use the
--privileged
flag to give extended privileges to a Docker container, allowing it to perform actions like mounting file systems which are normally restricted: