I was testing with GeoServer 2.6-RC1. Version 2.4.x is very soon out of maintenance so I did not feel like playing with it. I apologize it you can't update yet.
First thing that I learned is that you must PUT the whole datastore configuration file and not only the changed parts. Second lesson was that the configuration file does not look the same in GeoServer 2.6 than in this document http://docs.geoserver.org/stable/en/user/data/app-schema/data-stores.html. I finally studied the datastore config file by changing some settings with the GUI admin utility.
With this command I created a new datastore from directory of shapefiles:
C:\data\states>curl -v -u admin:geoserver -XPUT -H "Content-type: text/plain" -d "file:///data/states/" "http://localhost:8080/geoserver/rest/workspaces/topp/datastores/shapefiles/external.shp?configure=all"
The config file can now be reached from
For making the changes which you want the datastore.xml file should be edited like this:
<entry key="memory mapped buffer">false</entry>
<entry key="create spatial index">true</entry>
<entry key="cache and reuse memory maps">false</entry>
Save the edited file as "put.xml" and PUT it
C:\data\states>curl -v -u admin:geoserver -XPUT -H "Content-type: text/xml" -d @put.xml http://localhost:8080/geoserver/
This works for me.