2

I have an application that stores some files in the /tmp/appdata folder. I store these files so that the application does not have to copy these files from the network every time it is run.
I want to store these files for 90 days. For this I have set the value of TMPTIME to 90 in the file /etc/default/rcS.
The problem is that ubuntu seems to be ignoring this value. Every time I restart the ubuntu server the files in /tmp folder are cleaned and the appdata folder is deleted.
Why is happening? and How to fix this?

The version of ubuntu is given below.

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:    16.04
Codename:   xenial
4
  • /tmp is temporary folder. Everything you put into it will be erased at startup. You must choose another folder to store this content. I suggest you to use /opt, /usr/share, or any else.
    – Redbob
    Sep 15, 2017 at 17:50
  • thanks for the suggestion but I want to use this location as cache (sort off) and control whether it is over written is inside the application.
    – A j
    Sep 15, 2017 at 22:49
  • Again, /tmp is temporary folder. Everything you put into it will be erased at startup.
    – user692175
    Sep 17, 2017 at 2:40
  • 1
    Found the answer why is tmp getting cleaned out in ubuntu
    – A j
    Sep 17, 2017 at 22:01

0

You must log in to answer this question.

Browse other questions tagged .