I use sudo mkdir /var/lock/tt-rss/
to create this folder which a program called tiny rss needs. But if I reboot Ubuntu, the lock
and tt-rss
folders no longer exist. It's as if Ubuntu is treating them like temp folders.
I need /var/lock/tt-rss/
to be a permanent folder. How can I make it stay? I could probably do a startup entry, but that seems more of a workaround than a fix.
Since Oneiric,
/var/lock
is a symlink to/run/lock
:/run
and/run/lock
are tmpfs filesystems:In other words, your files are not stored on your root filesystem, but are lost at every reboot by design.
Files in
/{var,run}/lock
are not meant to be long-term storage locations. To solve your problem, you can create a script that creates/var/lock/tt-rss/
at every boot, and maybe that backups its content at every shutdown (depending on your needs). However this probably deserves an another question.