[mythtv-users] Directory not writeable

Stephen Worthington stephen_agent at jsw.gen.nz
Tue Nov 3 07:33:29 UTC 2015


On Tue, 3 Nov 2015 05:17:21 +0100, you wrote:

>Hoi Stephen,
>
>Tuesday, November 3, 2015, 4:48:36 AM, you wrote:
>
>> I have recently created a new storagegroup, using a new directory on
>> each of my recording partitions.
>
>mysql>> select * from storagegroup order by groupname,dirname;
>> +----+---------------------------+----------+-------------------------------+
>> | id | groupname                 | hostname | dirname              
>> +----+---------------------------+----------+-------------------------------+
>> | 37 | Archives                  | mypvr    | /mnt/arc1/recordings/
>> |  8 | Banners                   | mypvr    | /var/lib/mythtv/banners/      |
>> |  5 | Coverart                  | mypvr    | /var/lib/mythtv/coverart/     |
>> |  9 | DB Backups                | mypvr    | /var/lib/mythtv/db_backups/   |
>> | 30 | Default                   | mypvr    | /mnt/rec1/recordings/
>> | 19 | Default                   | mypvr    | /mnt/rec2/recordings/
>> | 21 | Default                   | mypvr    | /mnt/rec3/recordings/
>> | 23 | Default                   | mypvr    | /mnt/rec4/recordings/
>> | 28 | Default                   | mypvr    | /mnt/rec5/recordings/
>> | 34 | Default                   | mypvr    | /mnt/rec6/recordings/
>> | 35 | Default                   | mypvr    | /mnt/rec7/recordings/
>> | 38 | Default_crw-pvr           | mypvr    | /mnt/rec1/crw-pvr_recordings/ |
>> | 39 | Default_crw-pvr           | mypvr    | /mnt/rec2/crw-pvr_recordings/ |
>> | 40 | Default_crw-pvr           | mypvr    | /mnt/rec3/crw-pvr_recordings/ |
>> | 41 | Default_crw-pvr           | mypvr    | /mnt/rec4/crw-pvr_recordings/ |
>> | 42 | Default_crw-pvr           | mypvr    | /mnt/rec5/crw-pvr_recordings/ |
>> | 43 | Default_crw-pvr           | mypvr    | /mnt/rec6/crw-pvr_recordings/ |
>> | 44 | Default_crw-pvr           | mypvr    | /mnt/rec7/crw-pvr_recordings/ |
>> | 24 | External recording drives | mypvr    | /mnt/rec4/recordings/
>> | 29 | External recording drives | mypvr    | /mnt/rec5/recordings/
>> | 33 | External recording drives | mypvr    | /mnt/rec6/recordings/
>> | 36 | External recording drives | mypvr    | /mnt/rec7/recordings/
>> |  3 | Fanart                    | mypvr    | /var/lib/mythtv/fanart/       |
>> | 31 | Internal recording drives | mypvr    | /mnt/rec1/recordings/
>> | 26 | Internal recording drives | mypvr    | /mnt/rec2/recordings/
>> | 27 | Internal recording drives | mypvr    | /mnt/rec3/recordings/
>> |  7 | Screenshots               | mypvr    | /var/lib/mythtv/screenshots/  |
>> |  4 | Trailers                  | mypvr    | /var/lib/mythtv/trailers/     |
>> +----+---------------------------+----------+-------------------------------+
>
>
>> Today I discovered that mythbackend.log is showing errors for each of
>> the new directories:
>
>> storagegroup.cpp:763 (CheckAllStorageGroupDirs) SG(Default_crw-pvr):
>> Group 'Default_crw-pvr' wants to use directory
>> '/mnt/rec1/crw-pvr_recordings/', but this directory is not writeable.
>
>> Recordings that are scheduled to record to the new storagegroup are in
>> fact recording to the Default storagegroup.  But the new directories
>> are all world writeable, exactly like my Default directories:
>
>> root at mypvr:/var/log/mythtv# ll /mnt/rec1
>> total 1064
>> drwxrwxrwx  5 root root     40 Oct 12 02:40 ./
>> drwxrwxrwx 31 root root   4096 Oct  8 16:24 ../
>> drwxrwxrwx  2 root root   4096 Oct 31 19:34 crw-pvr_recordings/
>> drwxrwxrwx  4 root root     32 Aug 23  2014 images/
>> drwxrwxrwx  2 root root 200704 Nov  3 16:20 recordings/
>
>> If I login as my frontend user (mythtv group) and create a file in the
>> /mnt/rec1/crw-pvr_recordings/ directory, it works.
>
>> Does anyone have any ideas as to what the problem might be?
>> _______________________________________________
>
>First you say you tested as your frontend user, but the backend is
>doing all writing, so is that the same user?. Second is the directory
>per change accessed over nfs? Third how are rights to /mnt and
>/mnt/rec1. Forth if using nfs is the volume mounted on the same place
>on the backend giving the error?

This is a combined FE/BE Mythbuntu 14.04 system, so the frontend user
is in the mythtv group, and the backend user is user mythtv, also in
the mythtv group.  Both have full access to the directory and can
create files in it.  The recording drives are JFS, locally mounted in
fstab.

>And outside your question, I don't think it wise to apply such wide
>permissions other then to /tmp.

This PC is not accessible to anyone except myself, unless someone
breaks into my house, so I normally am not particularly worried about
security.


More information about the mythtv-users mailing list