I created and published a geoprocessing service from a toolbox. It works with a file geodatabase on my local drive. When run as a tool in ModelBuilder, it worked well and wrote data into the file geodatabase perfectly. However, when I published it as geoprocessing service and triggered it via REST service, it wrote data into the scratch.gdb in the job directory on the ArcGIS Server directories.
How can I configure the tool/model, or service or arcgis server to make it work with the original file geodatabase instead of the scratch file geodatabase?