Permission denied issue for access neo4j docker image's import folder

We have installed neo4j as docker image in Linux machine.when transfer the .csv file into neo4j import folder using ftp protocol it is throwing permission denied issue.Please help me on this

Did you check permissions on the folder? Check group, user and read/write bits.

I expect you are mapping the import folder to a folder on the host and ftping to there? If yes, the permissions on the folder will be the username/group that the docker container is running as.

Personally I run my docker containers as a user account (current user), and map the import folder to a folder on the host under that user's home, then that user account will have access to read/write files in the import folder. This is better security practice to not run as root and eliminates permissions issues with root owned folders/files.

Note: If you are you trying to ftp "into" the docker container, know that docker containers (by design/intent) typically only run the very minimum of processes required. (unless you rolled your own docker image, I don't expect it would have ftpd)

here are a few snippets from my script, I use environment variables so the script can be used for multiple neo4j containers. I create a directory ${NEO_GRAPH_DIR} earlier in the script, and the --user line sets the container to run as current user...

docker run \
  --user "$(id -u):$(id -g)" \
  --name "${CONTAINER}" \
  --detach \
  --env NEO4J_AUTH="${NEO4J_AUTH}" \
  --volume ${NEO_GRAPH_DIR}/data:/data \
  --volume ${NEO_GRAPH_DIR}/import:/import \
  --volume ${NEO_GRAPH_DIR}/plugins:/plugins \
  --volume ${NEO_GRAPH_DIR}/logs:/logs \

.......
.......
.......