On a typical CentOS 7 code directory is in /var/www/html/ (all the moodle code in here).
moodledata is typically in /var/www/ ... a directory that apache user/server already knows about.
In moodledata, **leave all but filedir** in moodledata ... those directories are muc,localcache,cache, sessions, etc directories ... why? Speed ... apache/php talking to moodle code which accesses directories in moodledata is fastest when accessed by localhost ... ie, same server.
The filedir directory in web server's moodledata is a mount point to the NAS @ nasserver/moodle/moodledata/filedir.
If you run automated backups might also make another mount point /var/www/autobackups that goes to the NAS. Course backups could also have a directory of it's own that could be yet another mount point.
The files uploaded to a moodle is in filedir.
The following might help:
'spirit of sharing', Ken