FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 05-03-2012, 09:14 AM
John Horne
 
Default What is removing files from /tmp?

On Wed, 2012-05-02 at 19:47 -0700, Dean S. Messing wrote:
> I'm running F15. Files are mysteriously being removed from /tmp after a
> number of days of not being touched. I am familiar with
> /etc/cron.daily/tmpwatch and, in fact, modify it to inhibit removal of
> files from /tmp. In the past this has worked. Under F15 it has not.
>
> Two or three weeks ago I deleted it from /etc/cron.daily but older files
> _still_ get removed from /tmp. I've rebooted at least once. I'm not
> sure if it happens at bootup or while the system is running, but
> something is still removing files from /tmp.
>
> Does anyone know of another mechanism for this?
>
Take a look in /var/spool/cron to see if some user crontab (like root)
is running tmpwatch or deleting the files. Also perhaps a check
of /etc/rc.local to see if something is causing this.

> I'm not sure if it happens at bootup or while the system is running
>
I would say add a file to /tmp, leave it a while, check it is still
present then reboot. After bootup see if it is still there.

If the problem isn't rebooting, then perhaps setup a cron job to monitor
the files' existence (say check every few minutes) and email you when it
has gone. It may give you more of an idea of when things are being
deleted. You can also check /var/log/cron to see if some cron job is
running causing the deletion at the time.




John.

--
John Horne, Plymouth University, UK
Tel: +44 (0)1752 587287 Fax: +44 (0)1752 587001

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-03-2012, 09:34 AM
Michael Schwendt
 
Default What is removing files from /tmp?

On Wed, 02 May 2012 19:47:03 -0700, DSM (Dean) wrote:

>
> I'm running F15. Files are mysteriously being removed from /tmp after a
> number of days of not being touched. I am familiar with
> /etc/cron.daily/tmpwatch and, in fact, modify it to inhibit removal of
> files from /tmp. In the past this has worked. Under F15 it has not.
>
> Two or three weeks ago I deleted it from /etc/cron.daily but older files
> _still_ get removed from /tmp. I've rebooted at least once. I'm not
> sure if it happens at bootup or while the system is running, but
> something is still removing files from /tmp.
>
> Does anyone know of another mechanism for this?

At least with recent systemd versions, there is the systemd-tmpfiles-clean
service. Dunno whether it's available in F15. And it defaults to 10 days
not 14, I think: "man tmpfiles.d"

--
Fedora release 17 (Beefy Miracle) - Linux 3.3.4-1.fc17.x86_64
loadavg: 1.93 1.83 1.25
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-03-2012, 11:06 AM
Andre Robatino
 
Default What is removing files from /tmp?

Dean S. Messing <deanm <at> sharplabs.com> writes:

> Not sure what you mean by specific hours of the day. I don't know how
> to tell when a file is removed from /tmp/, if that's what you mean.

yum install inotify-tools

man inotifywait

You could write a little script that saves ps output at the instant a file gets
deleted.




--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-03-2012, 01:48 PM
Greg Woods
 
Default What is removing files from /tmp?

On Thu, 2012-05-03 at 11:40 +0800, Ed Greshko wrote:

> When someone on this list asks for help in modifying a behavior to suit their
> needs/desires why are they often asked to justify their requests?

Probably because the intent is not to "justify" but to "clarify", and we
geeks are often fairly blunt about how we phrase things. As a sysadmin,
I frequently have users ask how to do something, and I often have to ask
them to clarify what they are really trying to accomplish, because often
what they have asked me how to do is far from the best way to accomplish
their real goal. The users are practicing medicine without a license (or
in this case, misdiagnosing the issue).

Here's a dumb example: it's like somebody asking how to survive cutting
off a finger. If what they really want is for the hangnail to stop
hurting, you certainly wouldn't advise them to cut off the finger! SO
when somebody at work asks me how to do something that seems analagous
to cutting off a finger, I respond by asking them what it is they are
really trying to accomplish. If somebody has already started down the
wrong path, the best way out of the forest may very well be to backtrack
a bit first.

--Greg


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-03-2012, 04:36 PM
Michael Hennebry
 
Default What is removing files from /tmp?

On Thu, 3 May 2012, Ed Greshko wrote:


On 05/03/2012 11:24 AM, Jeoe Zeff wrote:

On 05/02/2012 07:47 PM, Dean S. Messing wrote:

Does anyone know of another mechanism for this?


Just out of curiosity, why don't you want files to be removed from /tmp?



When someone on this list asks for help in modifying a behavior to suit their
needs/desires why are they often asked to justify their requests? In this case, and


I've been on the receiving end, so I've felt your pain.
Often it's just a rude "Don't do that.".

In this case, curiosity might have been inspired by your
desire to defeat a purpose for which something exists.
I'd have been inclined to include the inspiration along with the question.

Sometimes the right answer is
you can do that if you really want, but it's dangerous and it's a lot of
work with hard to explain details that depend on what you want it for.

Once upon a time, someone asked how to remove all traces of gnome.

Sometimes it's just a matter of religion.
Ask a question about using labels instead of UUIDs.


in may others, I can't see that seeking/offering justification will help in finding a
solution.


In this case, it might be helpful with a work around.

If you disapprove of cleaning, you might consider creating
a /clutter with the same permissions as /tmp .

--
Michael hennebry@web.cs.ndsu.NoDak.edu
"On Monday, I'm gonna have to tell my kindergarten class,
whom I teach not to run with scissors,
that my fiance ran me through with a broadsword." -- Lily
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-03-2012, 05:44 PM
"T.C. Hollingsworth"
 
Default What is removing files from /tmp?

On Thu, May 3, 2012 at 2:34 AM, Michael Schwendt <mschwendt@gmail.com> wrote:
> On Wed, 02 May 2012 19:47:03 -0700, DSM (Dean) wrote:
>> I'm running F15. *Files are mysteriously being removed from /tmp after a
>> number of days of not being touched. *I am familiar with
>> /etc/cron.daily/tmpwatch and, in fact, modify it to inhibit removal of
>> files from /tmp. *In the past this has worked. Under F15 it has not.
>>
>> Two or three weeks ago I deleted it from /etc/cron.daily but older files
>> _still_ get removed from /tmp. I've rebooted at least once. *I'm not
>> sure if it happens at bootup or while the system is running, but
>> something is still removing files from /tmp.
>>
>> Does anyone know of another mechanism for this?
>
> At least with recent systemd versions, there is the systemd-tmpfiles-clean
> service. Dunno whether it's available in F15. And it defaults to 10 days
> not 14, I think: "man tmpfiles.d"

Yes, F15 has this too.

As that man page indicates, you can exclude directories or files from
being cleaned with the 'x' type. So, create a file
/etc/tmpfiles.d/dont-clean-tmp-damnit.conf or such and put 'x /tmp' in
it and systemd will stop cleaning your /tmp.

-T.C.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-03-2012, 07:16 PM
David Quigley
 
Default What is removing files from /tmp?

On 05/03/2012 02:35, deanm@sharplabs.com wrote:

On Thu, 03 May 2012 at 15:40:40, Tim wrote:
While I can't answer to why old files might be disappearing, other
than
to check more than just *daily* CRON entries (hourly, weekly,
specific

hours of the day), I'll suggest one thing: If you want to keep /tmp
contents through a reboot, make sure that /tmp isn't mounted as
tmpfs.


Thanks. Checked those. weekly is empty. hourly contains the
anacron

trigger file and "mcelog.cron" which contains only comments.

Not sure what you mean by specific hours of the day. I don't know
how

to tell when a file is removed from /tmp/, if that's what you mean.

/tmp is not mounted at all on my system. It is a merely an ordinary
subdir of /.

Thanks for the suggestions.
Keep 'em coming.

Dean



If you don't mind waiting you could put an audit watch on that
directory and look for things unlinking files in the directory. Once you
notice a file missing you can look through the audit logs for the
syscall that did it and identify the offending process.


Dave
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-05-2012, 01:28 PM
Ted Roche
 
Default What is removing files from /tmp?

On Wed, May 2, 2012 at 11:40 PM, Ed Greshko <Ed.Greshko@greshko.com> wrote:
> On 05/03/2012 11:24 AM, Jeoe Zeff wrote:
>> On 05/02/2012 07:47 PM, Dean S. Messing wrote:
>>> Does anyone know of another mechanism for this?
>>
>> Just out of curiosity, why don't you want files to be removed from /tmp?
>
> That question raises a question that I've been wanting to ask several times. *So,
> although I'm asking it in this thread, it isn't solely directed at you.
>
> When someone on this list asks for help in modifying a behavior to suit their
> needs/desires why are they often asked to justify their requests? *In this case, and
> in may others, I can't see that seeking/offering justification will help in finding a
> solution.
>

This is often referred to as the "XY Problem" where a questioner has
problem X, has determined to solve it with solution Y, and is asking
for help getting solution Y to do what it is they think it should do.
In fact, solution Y may not be be the optimal solution, and there may
be a well-known and reliable solution to problem X. So, asking "why do
you want to do this?" often leads to the real problem, and a better
solution.

Ref: http://www.catb.org/~esr/faqs/smart-questions.html#id479492

--
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-05-2012, 01:42 PM
Reindl Harald
 
Default What is removing files from /tmp?

Am 05.05.2012 15:28, schrieb Ted Roche:
> On Wed, May 2, 2012 at 11:40 PM, Ed Greshko <Ed.Greshko@greshko.com> wrote:
>> When someone on this list asks for help in modifying a behavior to suit their
>> needs/desires why are they often asked to justify their requests? In this case, and
>> in may others, I can't see that seeking/offering justification will help in finding a
>> solution.
>>
>
> This is often referred to as the "XY Problem" where a questioner has
> problem X, has determined to solve it with solution Y, and is asking
> for help getting solution Y to do what it is they think it should do.
> In fact, solution Y may not be be the optimal solution, and there may
> be a well-known and reliable solution to problem X. So, asking "why do
> you want to do this?" often leads to the real problem, and a better
> solution.
>
> Ref: http://www.catb.org/~esr/faqs/smart-questions.html#id479492

especially in this case

why storing data in /tmp and search how to change behavior of the
OS instead simply use another directory and accept that /tmp is
NOT a place where you can expect your data are alive at any time
later?

mkdir /mytmp
chmod 1777 /mytmp

so, now you have a folder with the same permissions as /tmp
everybody can store files there, only the owner have access
to them and nothing of the OS is touching it

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 05-05-2012, 01:51 PM
"Mikkel L. Ellertson"
 
Default What is removing files from /tmp?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/05/2012 08:42 AM, Reindl Harald wrote:
>
>
> Am 05.05.2012 15:28, schrieb Ted Roche:
>> On Wed, May 2, 2012 at 11:40 PM, Ed Greshko
<Ed.Greshko@greshko.com> wrote:
>>> When someone on this list asks for help in modifying a behavior
to suit their
>>> needs/desires why are they often asked to justify their requests?
In this case, and
>>> in may others, I can't see that seeking/offering justification
will help in finding a
>>> solution.
>>>
>>
>> This is often referred to as the "XY Problem" where a questioner has
>> problem X, has determined to solve it with solution Y, and is asking
>> for help getting solution Y to do what it is they think it should do.
>> In fact, solution Y may not be be the optimal solution, and there may
>> be a well-known and reliable solution to problem X. So, asking "why do
>> you want to do this?" often leads to the real problem, and a better
>> solution.
>>
>> Ref: http://www.catb.org/~esr/faqs/smart-questions.html#id479492
>
> especially in this case
>
> why storing data in /tmp and search how to change behavior of the
> OS instead simply use another directory and accept that /tmp is
> NOT a place where you can expect your data are alive at any time
> later?
>
> mkdir /mytmp
> chmod 1777 /mytmp
>
> so, now you have a folder with the same permissions as /tmp
> everybody can store files there, only the owner have access
> to them and nothing of the OS is touching it
>
>
>
The way I do it is to create a tmp directory in each user's home
directory. (Add to /etc/skel) Then I have TMP set to this
directory. (Add local.sh and local.csh in /etc/profile.d) This
works for programs that honor TMP and is easy to add to scripts.

if [ -z $TMP ]
then
temp_file=/tmp/dd.$$
else
temp_file=$TMP/dd.$$
fi

Mikkel
- --
Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAk+lMGAACgkQqbQrVW3JyMSm4ACcCW1LU/abdyD9enyIQCw9E958
zQIAniPci+6V1wcwuqqvfwKstsAsOvMC
=qgxs
-----END PGP SIGNATURE-----

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 

Thread Tools




All times are GMT. The time now is 05:19 PM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org