Tagged: mode general state file
- This topic has 2 replies, 2 voices, and was last updated Oct 4-11:45 am by beringstraat.
- October 3, 2023 at 12:52 pm #118640Memberberingstraat
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?
ThanksOctober 3, 2023 at 1:27 pm #118646Forum Admindolphin_oracle::HelpfulUp2
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.
chown $USER:$USER /home/$USER/.bash-history
substituting $USER with your actual username.October 4, 2023 at 11:45 am #118745Memberberingstraat::HelpfulUp0
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?
- You must be logged in to reply to this topic.