title: Unwanted change of ownership of /root to uid 1000 (in: parted magic live system installed on USB pendrive; this happens when adding own programs)
body: <p>As in the title:
  When I add programs to Parted Magic<br>
  (as described here:   <a href="https://partedmagic.com/adding-programs/" rel="nofollow noreferrer">https://partedmagic.com/adding-programs/</a>  ; I actually "make my own bundle" by using "mksquashfs"; I applied <code>chmod 777 * -R</code>  to my filesystem before using "mksquashfs"; I then copyied the resulting *.sqfm file to the indicated folder (on the USB pendrive, which stays bootable; not nessessary to write the whole iso-image again); at the time of booting Parted Magic from the USB pendrive, my files are automatically installed by Parted Magic)<br>
  and I try to start firefox (which is part of the standard package of Parted Magic) this is not possible.
  (when using parted magic as is ("out-of-the-box"), firefox can be started without any problem.)</p>
  
  <p>The reason for this gets obvious when I open a terminal and enter "firefox", which is answered by:</p>
  
  <blockquote>
    <p>"Running Firefox as root in a regular user's session is not supported. ($HOME is /root which is owned by uid 1000.)</p>
  </blockquote>
  
  <p>Now, as Parted Magic is a Live System, it is normal that everything is run as root. 
  So, obviously the problem is that the ownership of /root is changed to uid 1000 but in order to work, the owner of /root should be root.
  (uid 1000 being the first "normal" user (apart from root) that linux creates;  this is explained here <a href="https://www.linuxquestions.org/questions/linux-general-1/what-is-the-user-1000-a-4175510196/" rel="nofollow noreferrer">https://www.linuxquestions.org/questions/linux-general-1/what-is-the-user-1000-a-4175510196/</a>    )</p>
  
  <p>I am able to start firefox when I change  the ownership of /root from UID 1000 to root, which can be done  by entering</p>
  
  <pre><code>chown root:root /root &amp;&amp;
  chmod 744 /root
  </code></pre>
  
  <p>(I didn't try if the second line <code>chmod 744 /root</code>  is necessary to make it work)</p>
  
  <p>Now, my question is:  Why does adding own programs (or even minor changes, like a textfile that is placed on the desktop of "Parted Magic") cause that ownership of /root is changed to uid 1000 ?  What do I need to do to avoid this change of ownership when adding stuff to "Parted Magic" ?  </p>
  
  <p>I hope this is the appropriate forum for my question.</p>