[mythtv-users] Group/user numbers changing on 16.04??

Jim Abernathy jfabernathy at outlook.com
Mon Aug 8 23:38:33 UTC 2016



> Date: Tue, 9 Aug 2016 00:13:05 +0200
> From: hikavdh at gmail.com
> To: mythtv-users at mythtv.org
> Subject: Re: [mythtv-users] Group/user numbers changing on 16.04??
> 
> Hoi Jim,
> 
> Monday, August 8, 2016, 11:55:32 PM, you wrote:
> 
> >   
> 
> 
> 
> >> Date: Mon, 8 Aug 2016 23:01:36 +0200
> >> From: hikavdh at gmail.com
> >> To: mythtv-users at mythtv.org
> >> Subject: Re: [mythtv-users] Group/user numbers changing on 16.04??
> >> 
> >> Hoi Jim,
> >> 
> >> Monday, August 8, 2016, 10:41:41 PM, you wrote:
> >> 
> >> > 
> >> 
> >> 
> >> 
> >> >> Date: Mon, 8 Aug 2016 22:13:41 +0200
> >> >> From: hikavdh at gmail.com
> >> >> To: mythtv-users at mythtv.org
> >> >> Subject: Re: [mythtv-users] Group/user numbers changing on 16.04??
> >> >> 
> >> >> Hoi Jim,
> >> >> 
> >> >> Monday, August 8, 2016, 9:06:49 PM, you wrote:
> >> >> 
> >> >> > 
> >> >> > To fix things or to upgrade to new versions of Mythbuntu, I just
> >> >> > rebuild my boot drive and leave my Storage directory drives alone. 
> >> >> > Same thing for network attached drives on a NAS.
> >> >> 
> >> >> 
> >> >> > The problem is the user mythtv and group mythtv have changed
> >> >> > numbers.  Mythtv group usesd to be 124 and mythtv user was 115.  Now
> >> >> > on the reinstall mythtv group is now 121 and mythtv user is 123. 
> >> >> 
> >> >> 
> >> >> > This is more of an issue for NAS drives/files since I have lots of
> >> >> > them. I can always recreate and format the storage directory drives
> >> >> > since I don't upgrade or reinstall when there are recordings on the system.
> >> >> 
> >> >> 
> >> >> > Is there an easy way to handle this?  I tried changing the owner
> >> >> > and group on the NAS, but I got permissions issues even when doing it as SU.
> >> >> 
> >> >> 
> >> >> > Jim A
> >> >> 
> >> >> > 
> >> >> 
> >> >> That is in part why I work with ldap. My UIDs and GIDs never change.
> >> >> 
> >> >> But back to the issue. What kind of permission issues, root UID 0 has
> >> >> by definition all conceivable rights on a system. However ssh can be
> >> >> blocked to root. It's a setting in /etc/ssh/sshd_config
> >> >> "PermitRootLogin". You can set it to yes, no and some intermediate
> >> >> settings to for instance only allow connection through ssl keys and
> >> >> not through a password.
> >> >> It is also possible that your NAS exposes a fake root user with
> >> >> another UID then 0. In that case I'm out of my depth as I never really
> >> >> worked with a NAS.
> >> >> 
> >> >> The simplest should be a:
> >> >>  sudo chown -R mythtv <path>
> >> >>   or
> >> >>  sudo chown -R mythtv.mythtv <path>
> >> >> on the relevant trees on the NAS
> >> >> 
> >> 
> >> 
> >> > When I try sudo chown mythtv:mythtv /media/media/TV_Shows/*
> >> > I get permission denied.  The mount in etc/fstab for the NAS is:
> >> 
> >> 
> >> > //192.168.0.250/media /media/media cifs
> >> > user=mythtv,password=myth_password 0 0 
> >> 
> >> 
> >> > I had to give the user mythtv a password for this to work
> >> > originally.  The network drive mounts and I can do stuff on the
> >> > drive as my user which is UID 1000 on both systems.  mythtv user is different now.
> >> 
> >> 
> >> > Jim A
> >> 
> >> 
> >> I now see you have mounted it as cifs, so it goes through sambas
> >> rights system. That could be the problem. That's also why you need the
> >> password. Hopefully you also have it as nfs-mount enabled on the NAS.
> >> The command I gave earlier then hopefully will mount it as nfs.
> >> Else I think you have to see if you can export (temporarily) as nfs,
> >> preferably with another name, and mount it as root.
> >> 
> >> 
> > Thanks,  I easily enabled NFS on the NAS4Free system and mounted it
> > as root and could fix all the permissions and ownerships.
> 
> 
> > The mount I used for those interested was:
> 
> 
> > sudo mount 192.168.0.250:/mnt/media as /media/media
> 
> Good!
> CIFS has many advantages especially in rights management. However the
> rights system sits on top of the Linux system and root rights are by
> default blocked and as you fond out, you cannot extend the rights
> through su or sudo. Normally you keep the same usernames and
> user-groups names as in Linux, but they are a different thing linked to
> the Linux users and groups and you can give them totally different
> names. What I see as the main advantage is that you can assign rights
> through secondary groups. 
> NFS mainly is the Linux rights system, but it only sees the primary
> group.
> Probably you could have achieved the same by creating a CIFS group
> with sufficient rights and add your CIFS user to it.
> 
Once I added :
     # media share on NAS4Free     192.168.0.250:/mnt/media /media/media  nfs defaults 0 0
to my /etc/fstab, and setup the NFS mount feature on my NAS to look at the same directory, my files in /media/media all worked just as you'd expect them to on any drive in Linux.  I could then do:
sudo chown -R mythtv:mythtv /media/media/
to fix all my permissions and ownership issues.
Jim A

> >> 
> >> Tot mails,
> >>   Hika                            mailto:hikavdh at gmail.com
> >> 
> >> "Zonder hoop kun je niet leven
> >> Zonder leven is er geen hoop
> >> Het eeuwige dilemma
> >> Zeker als je hoop moet vernietigen om te kunnen overleven!"
> >> 
> >> De lerende Mens
> >> 
> >> _______________________________________________
> >> mythtv-users mailing list
> >> mythtv-users at mythtv.org
> >> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> >> http://wiki.mythtv.org/Mailing_List_etiquette
> >> MythTV Forums: https://forum.mythtv.org
> >                                            
> 
> 
> 
> 
> Tot mails,
>   Hika                            mailto:hikavdh at gmail.com
> 
> "Zonder hoop kun je niet leven
> Zonder leven is er geen hoop
> Het eeuwige dilemma
> Zeker als je hoop moet vernietigen om te kunnen overleven!"
> 
> De lerende Mens
> 
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20160808/b7dad759/attachment.html>


More information about the mythtv-users mailing list