(Solved) change permanently the mode of a general-state-file

Forum Forums antiX-development Development (Solved) change permanently the mode of a general-state-file

  • This topic has 2 replies, 2 voices, and was last updated Oct 4-11:45 am by beringstraat.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #118640
    Member
    beringstraat

      Hello,

      I have antiX22 32bit on a stick and have put ~/.bash_history on the “General-State-list”. It works fine, the file is updated after reboot. But,… The file seems to be owned by root and, only root has read,write access. So I changed the mode to “accessible by me and the world”, after being logged in as root and,… after reboot root is back the owner and the file is only accessible again by root only.
      How can I change this?

      Thanks

      #118646
      Forum Admin
      dolphin_oracle
        Helpful
        Up
        2
        ::

        the state saving system was not meant for restoration of user files. when the restoration happens, the user isn’t even logged in.

        if you want to use the state system instead of the home persistence files, then you will also need a script or command that runs after the restoration that changes the ownership to what you want. you could launch that from /etc/rc.local.

        something like

        chown $USER:$USER /home/$USER/.bash-history

        substituting $USER with your actual username.

        #118745
        Member
        beringstraat
          Helpful
          Up
          0
          ::

          Thanks

          After putting the rc.local file also to the “general-state list” it worked.

          How do I close this thread? Or does it work automatically?

          Geert Exelmans

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.