I have a Windows host with a linux guest; I am using the linux guest as a local web server.
If I log into the linux guest and chmod a given file, for example, I can stat the file and the ctime is updated, as would be expected.
However, if I change into a directory that is shared between windows and linux (mounted with 'mount -t vboxsf -o rw,uid=1001,gid=1000 public_html /home/user/public_html) the ctime never changes; it only changes with I modify the file, so the ctime is a duplicate of mtime.
For example:
Code: Select all
user@Virtual:~> touch testfile
user@Virtual:~> stat testfile
File: `testfile'
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 803h/2051d Inode: 129039 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ user) Gid: ( 100/ users)
Access: 2010-12-12 13:43:12.183911096 -0600
Modify: 2010-12-12 13:43:12.183911096 -0600
Change: 2010-12-12 13:43:12.183911096 -0600
Code: Select all
user@Virtual:~> chmod 000 testfile
user@Virtual:~> stat testfile
File: `testfile'
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 803h/2051d Inode: 129039 Links: 1
Access: (0000/----------) Uid: ( 1000/ user) Gid: ( 100/ users)
Access: 2010-12-12 13:43:12.183911096 -0600
Modify: 2010-12-12 13:43:12.183911096 -0600
Change: 2010-12-12 13:43:12.183911096 -0600
Code: Select all
user@Virtual:~> vi testfile
user@Virtual:~> stat testfile
File: `testfile'
Size: 11 Blocks: 8 IO Block: 4096 regular file
Device: 803h/2051d Inode: 129039 Links: 1
Access: (0777/-rwxrwxrwx) Uid: ( 1000/ user) Gid: ( 100/ users)
Access: 2010-12-12 13:46:45.523682050 -0600
Modify: 2010-12-12 13:46:48.549692771 -0600
Change: 2010-12-12 13:46:48.578844056 -0600
The same problem happens with file atime, it doesn't work for any file mounted via vboxsf.
I understand if atime/ctime are not available if the files are accessed/changed from the Windows side (atime/ctime do not exist for windows files), but I am doing everything on the linux guest, it would be nice to have atime/ctime working normally.
Well, come to think of it, this is probably a limitation shared folders in VirtualBox... can someone confirm?