<p dir="ltr"><br>
On Sep 11, 2014 9:18 AM, "Hika van den Hoven" <<a href="mailto:hikavdh@gmail.com">hikavdh@gmail.com</a>> wrote:<br>
><br>
> Hoi Simon,<br>
><br>
> Thursday, September 11, 2014, 3:10:26 PM, you wrote:<br>
><br>
> > Daryl McDonald <<a href="mailto:darylangela@gmail.com">darylangela@gmail.com</a>> wrote:<br>
><br>
> >> OK, I'm creating the directory in /media/storage2 and I chown'd it and chmod'd it, and it looks like this:<br>
> >><br>
> >> drwxrwxr-x 2 mythtv root 4096 Sep 11 08:14 mythtv<br>
> >><br>
> >> whereas in /media/storage the same directory looks like:<br>
> >><br>
> >> drwxrwxr-x 15 ntp mythtv 4096 Sep 11 07:31 mythtv<br>
> >><br>
> >> Did I not chown it properly?<br>
><br>
> > Yes you did - the old one is "not correct".<br>
><br>
> > Take storage2 first. drwxrwxr-x means that it's a directory, the<br>
> > owner has full right, the group has full right, and everyone else<br>
> > has read (r) and execute(x)* rights. Then mythtv root means it's<br>
> > owned by mythtv (good) and group root which doesn't really matter.<br>
> > The key things is that mythtv user has wrx access.<br>
><br>
> > storage is odd ! It has full rights (rwx) to user and group, but<br>
> > the user is ntp - odd. However group mythtv has access so that's OK<br>
> > - it'll still work fine, but I'd probably change owner to mythtv.<br>
><br>
> > When it comes to privileges, it works like this (a bit simplified, but it'll do) :<br>
><br>
> > Does the current effective userid match the user set for the<br>
> > object, and if so does that give the user sufficient rights ? For<br>
> > storage2, the answer is yes, for storage the answer is no.<br>
><br>
> > If not, does the user have a group membership matching the group<br>
> > ownership of the object, and if so does that give the user<br>
> > sufficient rights ? For storage the answer is yes, so mythtv can use it.<br>
><br>
> > Lastly, do the "other" (or world) rights give the user sufficient<br>
> > permissions ? In this case not relevant as a prior match was OK.<br>
><br>
> > A user can be in several groups. In a business environment you<br>
> > might have groups for different departments - so sales people are in<br>
> > teh sales group and so on. But senior managers may be in several<br>
> > groups so that they can see files from multiple departments.<br>
><br>
><br>
> > * In the context of directories, execute permission means you can<br>
> > search and traverse the directory. Without it, you cannot see what<br>
> > is in it - but I think you can still write if you have write access<br>
> > - in effect you have a drop box where you can place files but not see what's in there.<br>
><br>
><br>
><br>
><br>
> > Daryl McDonald <<a href="mailto:darylangela@gmail.com">darylangela@gmail.com</a>> wrote:<br>
><br>
> >> Similarly the recordings directory doesn't look the same:<br>
> >><br>
> >> drwxrwxr-x 2 mythtv root 4096 Sep 11 08:33 recordings<br>
> >><br>
> >> as compared to:<br>
> >><br>
> >> drwxrwsr-x 2 mythtv mythtv 20480 Sep 11 07:31 recordings<br>
> >><br>
> >> How do I get an "s" in there and what is it's numerical value? 5<br>
><br>
> > s or S is the "sticky" bit. In this context, it simply means that<br>
> > regardless of the group membership of the user that creates any<br>
> > file, in the file system it's group ownership will be set to mythtv.<br>
> > Say we had two groups - sales and marketing. It might be reasonable<br>
> > to give sales people access to marketing files by making sales users<br>
> > members of the marketing group. But if a sales person puts a new<br>
> > file in the marketing folder, by default it would have group<br>
> > ownership of the users primary group - sales - and thus marketing<br>
> > people wouldn't be able to read it. So you'd put the sticky bit on<br>
> > the marketing folder so new files would be owned by the marketing group.<br>
> > In this case, if you made yourself a member of the mythtv group, it<br>
> > means you could dabble in that folder and things you created would<br>
> > be owned by the mythtv group rather than your own group. The sticky<br>
> > bits are set by setting the initial value of the mode to 1,2, or 3<br>
> > instead of 7. So 0770 gives owner and group full rights, making that<br>
> > 1770, 2770, or 3770 sets teh sticky bit for user and/or group.<br>
> > Whether you see s or S depends on whether the x attribute is also set.<br>
><br>
> >> I tried creating the directories as mythtv user, but permission was denied, and with sudo, I don't know mythtv's password. Should there be more to the command "sudo chown mythtv recordings"?<br>
><br>
> > If you su to root first, root can su or sudo to any user without a password.<br>
> > Otherwise - set a password for mythtv. "su -" or "sudo bash" to<br>
> > become root, then "passwd mythtv" will allow you to set the user<br>
> > password. I don't think this should affect anything else as it's<br>
> > only the user login password - it's not AFAIK used internally by Myth.<br>
><br>
> > _______________________________________________<br>
><br>
> Oh, and something comes to mind. Was the first storage directory<br>
> created under one of the other OS's? Then the current ntp user has the<br>
> uid (user id number) that in that OS belonged to mythtv. So change the<br>
> owner to the current mythtv and check any contents or run the chown<br>
> command with the -R parameter to change the whole contents of the<br>
> directory ( I assume there is only mythtv content in there)<br>
><br>
> Tot mails,<br>
> Hika mailto:<a href="mailto:hikavdh@gmail.com">hikavdh@gmail.com</a><br>
><br>
> "Zonder hoop kun je niet leven<br>
> Zonder leven is er geen hoop<br>
> Het eeuwige dilemma<br>
> Zeker als je hoop moet vernietigen om te kunnen overleven!"<br>
><br>
> De lerende Mens<br>
><br>
> _______________________________________________<br>
> mythtv-users mailing list<br>
> <a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
> <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
> <a href="http://wiki.mythtv.org/Mailing_List_etiquette">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
> MythTV Forums: <a href="https://forum.mythtv.org">https://forum.mythtv.org</a></p>
<p dir="ltr">Thanks, Simon and Hika for the detailed explanations. I'm away form the box right now, but I will study this info and implement accordingly.<br>
</p>