On 22 August 2011 20:48, Dennis Jacobfeuerborn dennisml@conversis.de wrote:
On 08/22/2011 07:01 PM, Trey Dockendorf wrote:
I have a shared web server that users can SSH / SFTP into to access their web content. Each users home directory is in a change root, and I use "mount -o bind" to put their respective webpage's document root into their home directory. Recently I was made aware that the contents of the mount's source are not the same as the mount point's, which I don't see how that is possible.
The file system is 3 virtual disks...each part of the same volume group. I have three LVMs, "/" , "/chroot" , and "/var".
Here's the entry in /etc/fstab...
/var/www/example.com http://example.com /chroot/home/user1/example.com http://example.com none defaults,bind 0 0
The mount is active, yet running a recursive diff between "/var/www/example.com http://example.com" and "/chroot/home/user1/example.com http://example.com" shows numerous differences.
This is a bit of a shot in the dark perhaps but in which order was the bind mount and httpd restarted last happen? Is it possible that httpd has a file handle to the inode where the underlying directory for the place being mounted too rather than the directory that is being bound? If you unmount the binding do you see any files there? Which location has the most recent files? These are the questions that first time to my mind for troubleshooting purposes.