Bug 722856

Summary: tmpwatch is noisy on fuse mount points, error: failed to lstat /tmp/a: Permission denied
Product: Red Hat Enterprise Linux 6 Reporter: Steve Traylen <steve.traylen>
Component: tmpwatchAssignee: Miloslav Trmač <mitr>
Status: CLOSED ERRATA QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: pkovar, pvrabec
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tmpwatch-2.9.16-4.el6 Doc Type: Bug Fix
Doc Text:
When searching for files or directories to remove, tmpwatch was reporting all failures to access these files or directories. This included expected access failures due to the restrictive default configuration of FUSE mount points. With this update, tmpwatch now silently ignores all EACCES errors, and the expected access failures regarding FUSE mount points are no longer reported.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-24 07:58:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Steve Traylen 2011-07-18 09:12:13 UTC
Description of problem:

When users mount fuse file systems in /tmp  tmpwatch prints out
this message which is then mailed routinly to the sysadmin.

error: failed to lstat /tmp/a: Permission denied


Version-Release number of selected component (if applicable):

tmpwatch-2.9.16-3.el6.x86_64

How reproducible:

Everytime

Steps to Reproduce:
1. Login as a not root user.
2. mkdir /tmp/a
3. Mount some random ssh server
    sshfs host.example.org:. /tmp/a
  
4. Run tmpwatch as cron does:
    /usr/sbin/tmpwatch  10d /tmp

Actual results:

error: failed to lstat /tmp/a: Permission denied

though the return code is 0.

Expected results:

No output

Additional info:

In this case of mountpoint in /tmp it probably makes no sense for tmpwatch
to do anything with it.

The mount point occupies no space and so I think tmpwatch should just skip over
it.

Comment 2 Steve Traylen 2011-07-18 09:27:36 UTC
Missed out a word in last but one paragraph:

In this case of a mountpoint in /tmp it probably makes  sense for tmpwatch
to not do anything with the moutpoint and skip over it.

Comment 3 RHEL Program Management 2011-07-18 09:38:04 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 4 Miloslav Trmač 2011-07-19 20:40:10 UTC
Thanks for your report.

If you are a Red Hat customer with an active subscription, please contact Red Hat support through the Red Hat Customer Portal at http://access.redhat.com/ to allow correct prioritization of this issue.

(In reply to comment #2)
> In this case of a mountpoint in /tmp it probably makes  sense for tmpwatch
> to not do anything with the moutpoint and skip over it.

tmpwatch does skip all mountpoints, but it needs to perform the lstat() operation to detect them.  However, the error message can and should be silenced.

Comment 10 Petr Kovar 2011-07-28 16:15:04 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When searching for files or directories to remove, tmpwatch was reporting all failures to access these files or directories. This included expected access failures due to the restrictive default configuration of FUSE mount points. With this update, tmpwatch now silently ignores all EACCES errors, and the expected access failures regarding FUSE mount points are no longer reported.

Comment 12 errata-xmlrpc 2011-08-24 07:58:11 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1199.html