mount --bind with vsftpd, du -h sums multiple copies of the same files
I'm jailing virtual users in vsftpd, but I'm giving them access to project directories using mount --bind. However, when I do du -h to check project disk usage, I'm seeing 28Gb used instead of 350Mb (approx numbers from memory). The disk usage command is summing one copy of the files in one directory for every time the project directory is mounted. Is this a valid side effect of using mount --bind or do I have something mis-configured?
For example, my project root is:
Users are all stored under:
So I am jailed to:
A project directory is mounted using --bind for each user on that project:
So if I upload a 1MB file to
and if the 'one' project has 20 members, the following shows 21Mb instead of just 1Mb:
cd /srv/download && du -h
Is this expected?