# Optimize: Can't Write Files

**URL:** <https://forums.plex.tv/t/optimize-cant-write-files/370682>\
**Category:** General Discussions\
**Tags:** server-linux\
**Created:** [February 2, 2019, 7:53pm UTC](https://forums.plex.tv/t/optimize-cant-write-files/370682 "2019-02-02T19:53:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gorgarp123](https://avatars.discourse-cdn.com/v4/letter/g/a8b319/32.png) [@gorgarp123](https://forums.plex.tv/u/gorgarp123)\
**Post date:** [February 2, 2019, 7:53pm UTC](https://forums.plex.tv/t/optimize-cant-write-files/370682/1 "2019-02-02T19:53:19Z")

</div>

So this has been asked in various forms but none have worked for me. I thought I’d throw it up here.

Scenario: Centos 7 box connected to Synology NAS via SMB share mounted at /media/Data.

Tried all variations of chown and chmod, no love. I can mess with files all day but plex just wont.

Any thoughts? I know I’m missing something stupid easy but you know how it goes, sometimes you need a second pair of eyes.

---

<div class="post-metadata">

**Author:** ![tom80H](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/tom80h/32/19753_2.png) [@tom80H](https://forums.plex.tv/u/tom80H)\
**Post date:** [February 2, 2019, 8:05pm UTC](https://forums.plex.tv/t/optimize-cant-write-files/370682/2 "2019-02-02T20:05:09Z")

</div>

you’re on the right track – this is a permissions issue.  
you’ll need to make sure that the `plex` user can read and write in the folders.

you might want to double-check the approach you’re using to mount the drive. If you mount it during bootup using `/etc/fstab` you might easily end up mounting it for root.

if you want it to work for the `plex` user as well the example below should help. Also, many of the Linux gurus recommend not to use the `/media` folder to mount your drives as this is used for removable media so the OS could get in your way:

> /etc/fstab  
> `//192.168.178.51/video /plexmedialibrary/video cif auto,defaults,nofail,credentials=[path-to-credentials],uid=plex 0 0`

This will mount the SMB network drive at `//192.168.178.51/video` in your local file system to the folder `/plexmedialibrary/video` with `plex` as its owner.

---

<div class="post-metadata">

**Author:** ![gorgarp123](https://avatars.discourse-cdn.com/v4/letter/g/a8b319/32.png) [@gorgarp123](https://forums.plex.tv/u/gorgarp123)\
**Post date:** [February 2, 2019, 8:51pm UTC](https://forums.plex.tv/t/optimize-cant-write-files/370682/3 "2019-02-02T20:51:07Z")

</div>

@tom80H Awesome. Thanks. It was that simple.

However, now it shows several files as “unavailable” but did complete one.

Ideas?

---

<div class="post-metadata">

**Author:** ![gorgarp123](https://avatars.discourse-cdn.com/v4/letter/g/a8b319/32.png) [@gorgarp123](https://forums.plex.tv/u/gorgarp123)\
**Post date:** [February 2, 2019, 9:12pm UTC](https://forums.plex.tv/t/optimize-cant-write-files/370682/4 "2019-02-02T21:12:16Z")

</div>

Nevermind, minor typo, cifs, not cif. All good. Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [May 3, 2019, 9:12pm UTC](https://forums.plex.tv/t/optimize-cant-write-files/370682/5 "2019-05-03T21:12:33Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
