# Read-only error with large scale mean shift

**URL:** <https://forum.orfeo-toolbox.org/t/read-only-error-with-large-scale-mean-shift/636>\
**Category:** OTB Usage\
**Created:** [April 16, 2020, 9:08pm UTC](https://forum.orfeo-toolbox.org/t/read-only-error-with-large-scale-mean-shift/636 "2020-04-16T21:08:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darren](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/d/e9a140/32.png) [@Darren](https://forum.orfeo-toolbox.org/u/Darren)\
**Post date:** [April 16, 2020, 9:08pm UTC](https://forum.orfeo-toolbox.org/t/read-only-error-with-large-scale-mean-shift/636/1 "2020-04-16T21:08:48Z")

</div>

Hi, I cant seem to figure out why this is happening, or find a solution to a previous online query either…

It seems the tool is trying to use a temp file directory (perhaps the working directory?) to write the image onto, but its being told its ‘read-only’.

Is there a way to fix this… ie. change the temp directory, or a workaround?

Orfeo version: OTB7.1.0  
Running on Mac OS X

* * *

2020-04-16 13:45:20 (INFO) LargeScaleMeanShift: Smoothing step…

2020-04-16 13:45:20 (INFO) LargeScaleMeanShift: Margin of 2001 pixels applied to each tile to stabilized mean shift filtering.

2020-04-16 13:45:20 (WARNING) LargeScaleMeanShift: Margin value exceed the input image size.

2020-04-16 13:45:20 (INFO) LargeScaleMeanShift: Mode Search is disabled.

2020-04-16 13:45:20 (INFO) LargeScaleMeanShift: Number of tiles: 3 x 3

2020-04-16 13:45:20 (INFO) LargeScaleMeanShift: Tile shifting …

## 2020-04-16 13:46:11 (FATAL) LargeScaleMeanShift: itk::ERROR: GDALImageIO(0x7fd5e44c0650): Attempt to create new tiff file `LMS\_Segmentation\_0\_0\_SEG.tif’ failed: Read-only file system

Thanks!

---

<div class="post-metadata">

**Author:** ![Cedric](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/c/ecd19e/32.png) [@Cedric](https://forum.orfeo-toolbox.org/u/Cedric)\
**Post date:** [April 21, 2020, 9:07am UTC](https://forum.orfeo-toolbox.org/t/read-only-error-with-large-scale-mean-shift/636/2 "2020-04-21T09:07:01Z")

</div>

Hello,

How are you using OTB ? (monteverdi ? command line ? QGIS ? …). Also can you provide the input parameter values you used ?

This application writes temporary files in the same directory as the output parameter (either `mode.vector.out` or `mode.raster.out`. Are you sure that you have write access to the output directory ?

Cédric
