fix write permissions

Change-Id: I2695c80fa9a3a91c660647f87ab54a9b0da80ddd
Reviewed-on: http://review.couchbase.org/35022
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Tested-by: Pavel Paulau <pavel.paulau@gmail.com>