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