[mythtv-users] Recording Permissions Problem

Geoff B geoffbon at gmail.com
Wed May 16 15:47:31 UTC 2012


On Tue, May 15, 2012 at 11:57 PM, Joseph Fry wrote:

>
> I'm running Mythbuntu 12.04 x64, with all storage directories pointing to
>> directories on a NAS (Thecus N4100PRo).
>> I'm mounting the NAS locally using NFS, with this:
>> mount -o soft,intr,rsize=8192,wsize=8192
>> gromit:/raid0/data/_NAS_NFS_Exports_/mythtv /mnt/nfs
>>
>> It mounts correctly, but I am unable to play recordings because of a
>> permission problem; the recording and png files appear as:
>> -rwxrwxrwx+ 1 mythtv mythtv 1267934040 May 15 19:44
>> 1476_20120515193000.mpg*
>> On the NAS, the directory is exported using:
>> "Guest system root account will have full access to this share
>> (root:root)."
>>
>> When I try and play these, I get a message to the effect of:
>> "Recording unavailable: <title><subtitle> The file for this recording can
>> not be found"
>>
>> I am also unable to play these in VLC.
>>
>> If I do a
>> sudo chown mythtv:users *
>> ...then this fixes it.
>>
>> What am I doing wrong?
>>
>
> How did these files get on the NAS?  It appears that you uploaded them
> with the root user.  You will probably need to chown everything to start
> with.  New recordings by the backend should already have the right
> permissions... don't they?
>
> The files are being created by the MythTV frontend, with owner/group of
mythtv:mythtv - which I assumed was correct.
Myth is having no problem creating the file (I assume that's the backend),
but cannot play them back (I assume this would be the frontend?).

If only the root user can upload to the nas at all you probably need to
> create a 'mythtv' user and 'mythtv' and/or 'users' group on the NAS with
> the same UID and GID as appear on your mythbackend then assign those
> users/groups access to the folder on the NAS.
>
> I looked up the manual for your NAS and couldn't find a way to adjust the
> NFS export settings... however if you find a way, there is a real easy way
> to ensure that files all get the right permissions, regardless of the user
> that creates them.  The combination of the "all_squash", "anonuid", and
> "anongid" says to force all connections to use the anonymous uid and gid,
> then specifies what that uid and gid should be.  Essentially, they create a
> "share" that sets the same uid/gid on all files saved via nfs.
>
> for example:
> /exports/mythtv
> 192.168.1.0/24(rw,insecure,sync,wdelay,no_subtree_check,nohide<http://192.168.1.0/24%28rw,insecure,sync,wdelay,no_subtree_check,nohide>
> ,*all_squash,anonuid=888,anongid=888*)
>
>
Thanks for the pointers on the export configuration - I didn't realise
there was a way to force the incoming user to be forced to a specific UID;
digging into how the shares are exported is going to be my next plan of
attack if necessary, or perhaps finding a way to change the UIDs on the NAS
without breaking anything (there's nothing in their GUI for it).
Cheers,
Geoff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20120516/9ec9ad16/attachment.html>


More information about the mythtv-users mailing list