Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Since Oneiric, /var/lock is a symlink to /run/lock:

$ ls -ld /var/lock
lrwxrwxrwx 1 root root 9 Jan 15 18:30 /var/lock -> /run/lock

/run and /run/lock are tmpfs filesystems:

$ mount | grep /run
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)

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.

share|improve this answer
    
Thank you. I made a startup script (bash) in init.d to make the folder. I used this guide: jonathonhill.net/2009-04-23/… –  nLinked Jan 17 '13 at 17:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.