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:
/srv/download/projects
e.g.
/srv/download/projects/one
Users are all stored under:
/srv/download/users
So I am jailed to:
/srv/download/users/mike
A project directory is mounted using --bind for each user on that project:
/srv/download/users/mike/projects/one
So if I upload a 1MB file to
/srv/download/users/mike/projects/one/one_meg_file.dat
and if the 'one' project has 20 members, the following shows 21Mb instead of just 1Mb:
cd /srv/download && du -h
Is this expected?
Thanks
|