lewashby 56 Junior Poster

I'm currently building a headless Debian NFS media server and I'm doing most of my testing on my desktop. My cliant streaming device will by my "WD TV Live' TV streamer because it can read a Linux NFS network, I hate Samba. One of my problems is that the TV live will, via the internet, fetch the cover art for each movie title in my library but in order to do that it needs write access. I don't like the idea of giving my TV Live write access to my library for a number of reasons. My solution was to give the TV Live write access to one directory but store my movies in another. I then wrote a script in bash to read each file RO movies directory and create a link to it in my RW TV Live directory. My script worked and I can play the movies but for whatever reason my TV Live still can't write to the directory that I gave it write access to, both through NFS as well as through ext4 permissions. Here is the message I get when I try to fetch the meta data and cover art for each title
-> Unable to create media library. The selected source is configured ad Read-Only which prevents the WD TV from saving the media library.

Here is is the permissions to the library I'm sharing.
drwxrwxrwx 2 garrett garrett 4096 Jan 14 10:08 Videos1

And here is my /etc/exports file

# /etc/exports: the access control list for filesystems which may be exported
#        to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
#/home/garrett/Videos * (ro,async,subtree_check)
/home/garrett/VideoTest/Videos1 * (rw,async,subtree_check)

And just in case you wanted to see here's my script

#!/bin/bash

SOURCEPATH="/home/garrett/VideoTest/Videos2/"
TARGETPATH="/home/garrett/VideoTest/Videos1/"

cd ${SOURCEPATH}
ls *mkv | while read LSRESULTS
do
    cd ${TARGETPATH}
    if [ ! -a "${LSRESULTS}" ]; then
        ln "${SOURCEPATH}${LSRESULTS}" "${TARGETPATH}${LSRESULTS}"
    fi
done

#END#

Any ideas?

Dani AI

Generated

— short diagnosis and focused checks.

Symptoms show the export and filesystem are locally writable (directory is 777 and the hard-link script worked), but the WD TV Live reports the source as read-only. That pattern usually means the NFS server is refusing write requests from that client rather than standard Unix permissions blocking them.

Quick, ordered checks (reproducible from another Linux box):

exportfs -v
showmount -e <nfs-server>
mount -t nfs -o vers=3 <nfs-server>:/home/garrett/VideoTest/Videos1 /mnt
touch /mnt/.wd_test

If the manual mount is writable, the problem is client-specific (WD TV). If it is read-only, server export options or RPC policy are the cause.

Likely culprits and fixes

  • Many embedded media players use unprivileged source ports (>1024). Add the insecure export option for that client or subnet; for example restrict to the LAN and include insecure and no_subtree_check (re-export with exportfs -ra).
  • If the device performs operations as root, root_squash may map it to nobody; for short debugging no_root_squash can be tested, but do not leave it enabled on an unsecured network.
  • Confirm NFS version compatibility: force NFSv3 if the WD only supports v3 (some devices don’t implement v4 fully).

Other useful checks

  • Inspect server logs for nfsd denials (e.g. grep -i nfs /var/log/syslog or dmesg), and confirm the underlying filesystem isn’t mounted R/O (mount | grep /home/garrett).
  • Test write behavior from a second client to isolate whether the issue is the WD client or the server’s export policy.

The hard-link approach is fine for exposing files; the practical fix in most WD-TV cases is adjusting the export options (insecure / appropriate host/netmask) and re-exporting rather than changing file ownership.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.