# Docker volume like ftp

**URL:** <https://forums.docker.com/t/docker-volume-like-ftp/62588>\
**Category:** General\
**Created:** [November 12, 2018, 7:42am UTC](https://forums.docker.com/t/docker-volume-like-ftp/62588 "2018-11-12T07:42:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![margiel](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@margiel](https://forums.docker.com/u/margiel)\
**Post date:** [November 12, 2018, 7:42am UTC](https://forums.docker.com/t/docker-volume-like-ftp/62588/1 "2018-11-12T07:42:11Z")

</div>

Hi,  
I already install [owncloud](https://github.com/owncloud-docker/server) on Fedora release 27.  
I started owncloud by docker-compose up and docker runs and works.

Instance of fedora server is only for system not for data. So I want to try modify volume where pictures and documents are store. And my problem is how to create a volume in  
[docker-compose.yml](https://github.com/owncloud-docker/server/blob/master/docker-compose.yml)  
which will be connected to my ftp server where the data can be stored.

I try three solutions.  
**First solution**  
I’ve mounted ftp  
`curlftpfs user:pass@192.168.100.5 /mnt/qnap_data/ -o allow_other,uid=0,gid=0,umask=000`  
and the content was  
`drwxrwxrwx. 1 root root 1024 Jan 1 1970 qnap_data`  
After that I changed docker-compose.yml  
In section services -\> owncloud -\> volumes I changed line:  
`- files:/mnt/data`  
to: `- /mnt/qnap_data/Document/OwnCloudData:/mnt/data`

I run docker-compse, docker started correctly, but the site was shutdown and in location  
`/mnt/qnap_data/Document/OwnCloudData` docker create only the folder, no data was saved.

**Second solution**  
It was exactly the same like first but I used  
`sshfs user@192.168.100.5:/share/Documents/DockerVolumes /mnt/docker_volumes/`  
And the result was exactly the same, no files was saved in the location.

**Third solution**  
I stop docker and delete my folder volume into location `/var/lib/docker/volumes/`  
and made symlink to ftp from first solution:  
`ln -s /mnt/qnap_data/Documents/DockerVolumes/ volumes`  
docker can not run properly.

If anybody has any ideas, I will be grateful for help.

---

<div class="post-metadata">

**Author:** ![victorbarajas89](https://avatars.discourse-cdn.com/v4/letter/v/7ba0ec/32.png) [@victorbarajas89](https://forums.docker.com/u/victorbarajas89)\
**Post date:** [November 13, 2018, 1:25am UTC](https://forums.docker.com/t/docker-volume-like-ftp/62588/2 "2018-11-13T01:25:41Z")

</div>

Your idea is not clear to me, but a temporary solution is that you save the information in a docker volume and from the owncloud console you can upload it to an external ftp server. Maybe that can be useful for you.

Another point that you should keep in mind is the following, when you do a bind mount on a directory that is not empty, docker deletes the contents of that directory not empty to put what exists in bind mount, for example, in the host filesystem you have an X directory with file A and in the filesystem of the container you have a directory Y with file B, when you do a bind mount of directory X over directory Y, file B will be deleted and only file A will remain .
