Bug 902743

Summary: Cleanup of Temporary files failed on /run/user/1000/gvfs
Product: Red Hat Enterprise Linux 7 Reporter: Petr Sklenar <psklenar>
Component: gvfsAssignee: Ondrej Holy <oholy>
Status: CLOSED CURRENTRELEASE QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.0CC: jones.peter.busi, msekleta, msimon
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gvfs-1.14.2-3.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 12:19:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
tail /var/log/messages none

Description Petr Sklenar 2013-01-22 11:28:44 UTC
Description of problem:
Cleanup of Temporary files failed on /run/user/1000/gvfs

Version-Release number of selected component (if applicable):
systemd-195-15.el7.x86_64
gvfs-1.14.2-2.el7.x86_64


How reproducible:
always

Steps to Reproduce:
1. install latest rhel7
2. see /var/log/message for "Permission denied"

Actual results:
mount shows:
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

error in /var/log/message:
Jan 22 01:33:39 unused-4-191 systemd[1]: Starting Cleanup of Temporary Directories...
Jan 22 01:33:39 unused-4-191 systemd-tmpfiles[3151]: stat(/run/user/1000/gvfs) failed: Permission denied
Jan 22 01:33:39 unused-4-191 systemd[1]: Started Cleanup of Temporary Directories.

file attributes are strange:

d?????????? ? ?     ?       ?            ? gvfs


Expected results:
no error in /var/log/message

Additional info:

Comment 2 Tomáš Bžatek 2013-01-22 12:49:33 UTC
Umm, "cleaning" contents of user mounts would be disaster. We're lucky it's not allowed.

Comment 3 Petr Sklenar 2013-01-22 12:58:14 UTC
(In reply to comment #2)
> Umm, "cleaning" contents of user mounts would be disaster. We're lucky it's
> not allowed.

failures in /var/log/message doesn't seems to be user-friendly.
Shouldn't be /run/user/1000/gvfs and related gvfs files whitelisted by systemd-tmpfiles ?

Comment 4 Tomáš Bžatek 2013-01-22 13:33:51 UTC
(In reply to comment #3)
> failures in /var/log/message doesn't seems to be user-friendly.

No, that's fine, it's obvious on a first look if you know that the path is actually a restricted fuse mount.

> Shouldn't be /run/user/1000/gvfs and related gvfs files whitelisted by
> systemd-tmpfiles ?

Yes, that would be the way to go. Can you please try placing following file in your system? 

echo "x /run/user/*/gvfs" > /usr/lib/tmpfiles.d/gvfs.conf

That would hopefully create an exception.

Googling around, I've found https://bugs.archlinux.org/task/32715 which suggests to exclude whole /run/user since it will stat the gvfs directory anyway. Let's see if the first solution helps.

Comment 5 Petr Sklenar 2013-01-22 14:22:10 UTC
[root@unused-x ~]# cat /usr/lib/tmpfiles.d/gvfs.conf
x /run/user/*/gvfs
[root@unused-x ~]# systemd-tmpfiles --clean
stat(/run/user/1000/gvfs) failed: Permission denied

and this is better:
[root@unused-x ~]# cat /usr/lib/tmpfiles.d/gvfs.conf 
x /run/user/*
[root@unused-x ~]# systemd-tmpfiles --clean

Comment 6 Tomáš Bžatek 2013-02-06 15:45:12 UTC
I've committed an exclusion file upstream, F18, F19 a and RHEL7. This will make sure that no data would get lost.

The systemd-tmpfiles warning however is still present and according to systemd source code analysis this won't go away easily without fixing systemd. It's a harmless warning anyway, suggesting to ignore it.

If that is a problem, please shout and we will try to fix systemd instead.

Comment 7 Peter H. Jones 2013-05-25 03:50:22 UTC
Created attachment 752937 [details]
tail /var/log/messages

I'm getting this frequently on FC18. The incident that caused me to search for this message is when my machine hung during boot with about half of the light-bulb filled. After waiting several minutes, I tried CTRL-ALT-DEL, CTRL-SHIFT-ALT-DEL,CTRL-ALT-F2, and jabbing the power button, all to no avail. I then held the power button to force a power down, and then rebooted. System appeared to work normally. The relevant part of the attached messages file is:

"May 24 20:11:06 localhost systemd[1]: Starting Cleanup of Temporary Directories...
May 24 20:11:11 localhost systemd-tmpfiles[2107]: stat(/run/user/1000/gvfs) failed: Permission denied
May 24 20:11:12 localhost systemd[1]: Started Cleanup of Temporary Directories.
May 24 20:24:59 localhost systemd[1]: Starting Show Plymouth Power Off Screen...
May 24 20:24:59 localhost systemd[1]: Deactivating swap /dev/sda7..."

Comment 8 Martin Simon 2014-04-25 08:40:09 UTC
I can't see any "permission denied" in /var/log/messages nor after executing # systemd-tmpfiles --clean with systemd-208-11.el7.x86_64 and gvfs-1.16.4-7.el7.x86_64. I'm closing this as verified.

Comment 9 Ludek Smid 2014-06-13 12:19:51 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.