RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1139001 - "mkdir: cannot create directory '$HOME/.cache': Permission denied" warning when opening shell without write on $HOME
Summary: "mkdir: cannot create directory '$HOME/.cache': Permission denied" warning wh...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: abrt
Version: 7.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Jakub Filak
QA Contact: Iveta Wiedermann
URL:
Whiteboard:
: 1114864 (view as bug list)
Depends On: 1141485
Blocks: GSS_Sat6Beta_Tracker, GSS_Sat6_Tracker
TreeView+ depends on / blocked
 
Reported: 2014-09-07 11:21 UTC by Pavel Moravec
Modified: 2016-12-01 00:47 UTC (History)
8 users (show)

Fixed In Version: abrt-2.1.11-13.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 13:26:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0556 0 normal SHIPPED_LIVE abrt, libreport, and satyr bug fix and enhancement update 2015-03-05 16:44:43 UTC

Description Pavel Moravec 2014-09-07 11:21:44 UTC
Description of problem:
Any run of foreman-rake on RHEL7 raises error:
mkdir: cannot create directory '/usr/share/foreman/.cache': Permission denied

It seems the error has no impact to any foreman command I used.

Trying on RHEL6 on the same RPM version (foreman-1.6.0.44-1.el6sat.noarch), the mkdir error is not raised.

Version-Release number of selected component (if applicable):
foreman-1.6.0.44-1.el7sat.noarch


How reproducible:
100%


Steps to Reproduce:
1. Execute on Sat6 on RHEL7:
foreman-rake --help
(or any other foreman-rake command like "permissions:reset")


Actual results:
mkdir: cannot create directory '/usr/share/foreman/.cache': Permission denied
(command seems to be executed properly, just the error is printed out)


Expected results:
No such error.


Additional info:
I dont know what is the purpose of .cache directory. If it is important in some cases, please modify BZ severity appropriately.

Comment 2 Dominic Cleal 2014-09-11 15:57:52 UTC
I'm unable to reproduce this at all, and I can't think what ~/.cache would be used for (the only thing that comes to mind is apipie-bindings, which is only in the CLI, not core).

Would you be able to give me temporary access to your host, if still available?

Comment 4 Dominic Cleal 2014-09-12 11:36:07 UTC
This appears to be an ABRT profile.d script that I think should be quieter and more forgiving if the user's home directory is not writeable when creating a login shell.

# getent passwd foreman
foreman:x:994:993:Foreman:/usr/share/foreman:/bin/false
# ll -d /usr/share/foreman
drwxr-xr-x. 13 root root 4096 Sep  7 10:52 /usr/share/foreman
# su - foreman -s /bin/bash -c true
mkdir: cannot create directory '/usr/share/foreman/.cache': Permission denied

# grep -B 4 -r mkdir /etc/profile.d/
/etc/profile.d/abrt-console-notification.sh-LPATHDIR="$HOME/.cache/abrt"
/etc/profile.d/abrt-console-notification.sh-SINCEFILE="$LPATHDIR/lastnotification"
/etc/profile.d/abrt-console-notification.sh-
/etc/profile.d/abrt-console-notification.sh-if [ ! -f "$LPATHDIR" ]; then
/etc/profile.d/abrt-console-notification.sh:    mkdir -p "$LPATHDIR"

# rpm -qf /etc/profile.d/abrt-console-notification.sh
abrt-console-notification-2.1.11-12.el7.x86_64


Steps to reproduce (on clean RHEL 7):
1. su - postfix -s /bin/bash -c true

Expected result:
no output

Actual result:
mkdir: cannot create directory '/var/spool/postfix/.cache': Permission denied

Comment 7 Jakub Filak 2014-09-15 11:32:25 UTC
Upstream commit https://github.com/abrt/abrt/commit/592b7e19a20b38547c5b3c5d81add27ed79e05a9 fixes this bug.

Comment 9 Jakub Filak 2014-09-25 10:10:30 UTC
*** Bug 1114864 has been marked as a duplicate of this bug. ***

Comment 14 errata-xmlrpc 2015-03-05 13:26:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0556.html


Note You need to log in before you can comment on or make changes to this bug.