Mounting a case-insensitive filesystem on Linux
Thursday, the 25th of November, 2010
Recently I had a web developer who was coding on a Linux server, he was used to working on Windows servers and was having problems dealing with the case sensitivity of the EXT3 filesystem. I looked into it and in addition to using the Apache mod_speling [sic] module, also decided to go a step further. As root or using sudo do the following:
- Create a file of the size you wish the filesystem to be, 1GB in this example:
dd if=/dev/zero of=fat32.disk bs=1K count=1M
- Format the filesystem, fat32 in this example but you can use NTFS or another case-insensitive file system:
mkfs.vfat fat32.disk
- Mount the filesystem and test it, you may wish to use
uid=andgid=to mount it as a specific user and you’ll probably want to adjust theumaskto something less permissive:mount /media/fat32.disk /var/www/fat32 -t vfat -o loop,owner,group,umask=000
- Add it to
/etc/fstabso that it gets mounted after a reboot:/media/fat32.disk /var/www/fat32 vfat loop,owner,group,umask=000 0 0
I wouldn’t use this for production systems, in that situation I’d recommend a dedicated FAT32 or NTFS partition. If you do have to run this on a production system it should be fine for 99% of setups, it just feels like a quick hack to me.