It must be the POSIXLY_CORRECT variable, which allows me to use any other file name instead of ~/.bashrc, if I put the name in the environment variable ENV, as described in POSIX specification.

On my CentOS 6.3 at work it appears to be a run-time setting, not only compile-time. Whenever I ran the `mount` command for my davfs2 folder with POSIXLY_CORRECT set, I get the error message.

Strictly speaking I believe the system `mount` command should invoke the `mount.fstype` sub-commands with the right order of options on the command line, at least when POSIXLY_CORRECT is set, but I think it does things the way it does for historical / compatiblity reasons.

davfs2 relies on some enhancements and extensions of GNU libc. The GNU version of the getopt function already rearanges the arguments.Options and non-option arguments can be given in any order without problems. This works on my system and most other GNU/Linux systems.

Possible reasons why this does not work for you:
- your system uses another libc without this enhancement
- while building davfs2 the variable POSIX_CORRECT was set which will switch off this behaviour.

To make it easier to port davfs2 to non_GNU systems I started to use Gnulib which makes the GNU enhancements available on non-GNU systems. The code is in the MAIN branch of the CVS. But this code also contains a lot of other changes to davfs2. As far as I have tested it is working. But it is not finished and not seriously tested.

In this case, mount.davfs will exit with the error message "too many arguments".

To overcome this without changes on the davfs2 source code, I wrote a simple wrapper executable that re-arranges the arguments on the command line, than exec's the real mount.davfs (a script with the same purpose would not work here, `mount` command will not run it).

It is attached here if anyone else runs into the problem, but I really think webdavfs (mount.davfs) should be fixed to allow different order of arguments.