Index: libs/libmythtv/datadirect.cpp
===================================================================
--- libs/libmythtv/datadirect.cpp.orig
+++ libs/libmythtv/datadirect.cpp
@@ -1561,7 +1561,7 @@ bool DataDirectProcessor::SaveLineupToCa
 
     VERBOSE(VB_GENERAL, "SaveLineupToCache("<<lineupid<<") -- success");
 
-    chmod(fn.ascii(), 0666); // Let anybody update it
+    makeFileAccessible(fn); // Let anybody update it
 
     return true;
 }
Index: libs/libmythtv/previewgenerator.cpp
===================================================================
--- libs/libmythtv/previewgenerator.cpp.orig
+++ libs/libmythtv/previewgenerator.cpp
@@ -461,7 +461,7 @@ bool PreviewGenerator::SavePreview(QStri
 
     if (small_img.save(filename, "PNG"))
     {
-        chmod(filename.ascii(), 0666); // Let anybody update it
+        makeFileAccessible(filename); // Let anybody update it
 
         VERBOSE(VB_PLAYBACK, LOC +
                 QString("Saved preview '%0' %1x%2")
@@ -475,7 +475,7 @@ bool PreviewGenerator::SavePreview(QStri
     if (QFileInfo(filename.ascii()).exists() &&
         small_img.save(newfile.ascii(), "PNG"))
     {
-        chmod(newfile.ascii(), 0666);
+        makeFileAccessible(newfile);
         rename(newfile.ascii(), filename.ascii());
 
         VERBOSE(VB_PLAYBACK, LOC +
Index: programs/mythbackend/mythxml.cpp
===================================================================
--- programs/mythbackend/mythxml.cpp.orig
+++ programs/mythbackend/mythxml.cpp
@@ -1237,6 +1237,8 @@ void MythXML::GetPreviewImage( HTTPReque
 
     img.save( pRequest->m_sFileName.ascii(), "PNG" );
 
+    makeFileAccessible(pRequest->m_sFileName);
+
     delete pImage;
 }
 
Index: libs/libmyth/util.cpp
===================================================================
--- libs/libmyth/util.cpp.orig
+++ libs/libmyth/util.cpp
@@ -927,6 +927,29 @@ QString createTempFile(QString name_temp
     return tmpFileName;
 }
 
+/** \fn makeFileAccessible(QString)
+ *  \brief Makes a file accessible to all frontends/backends.
+ *
+ *   This function abstracts the functionality of making a file accessible to
+ *   all frontends and backends.  Currently it contains a permissions hack that
+ *   makes a file accessible even on a system with an improperly configured
+ *   environment (umask/group) where the frontend and backend are being run as
+ *   different users or where a NFS share is used but UID's/GID's differ on
+ *   different hosts.
+ *
+ *   Though the function currently only changes the file mode to 0666, by
+ *   abstracting the functionality, it will be easier to make changes in the
+ *   future if a better approach is chosen.  Similarly, using this function
+ *   allows the hack to be applied only when required if code is written to
+ *   detect or allow the user to specify their system is misconfigured.
+ *
+ *  \param filename   Path of file to make accessible
+ */
+void makeFileAccessible(QString filename)
+{
+    chmod(filename.ascii(), 0666);
+}
+
 double MythGetPixelAspectRatio(void)
 {
     float pixelAspect = 1.0;
Index: libs/libmyth/util.h
===================================================================
--- libs/libmyth/util.h.orig
+++ libs/libmyth/util.h
@@ -79,6 +79,7 @@ MPUBLIC bool telnet(const QString &host,
 MPUBLIC long long copy(QFile &dst, QFile &src, uint block_size = 0);
 MPUBLIC QString createTempFile(QString name_template = "/tmp/mythtv_XXXXXX",
                                bool dir = false);
+MPUBLIC void makeFileAccessible(QString filename);
 MPUBLIC unsigned long long myth_get_approximate_large_file_size(
     const QString &fname);
 
