update directory of database
Added permission for write in external storage