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 1432319 - [RFE] Configuration option so that normal users can use the root yum cache in "/var/cache/yum"
Summary: [RFE] Configuration option so that normal users can use the root yum cache in...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 7.4
Assignee: Michal Domonkos
QA Contact: Eva Mrakova
Lucie Vařáková
URL:
Whiteboard:
: 1500666 (view as bug list)
Depends On:
Blocks: 1420851 1465896 1466368
TreeView+ depends on / blocked
 
Reported: 2017-03-15 06:19 UTC by Supreet
Modified: 2021-06-10 12:03 UTC (History)
6 users (show)

Fixed In Version: yum-3.4.3-156.el7
Doc Type: Release Note
Doc Text:
*yum* can disable creation of per-user cache as a non-root user New "usercache" option has been added to the `yum.conf(5)` configuration file of the *yum* utility. It allows the users to disable the creation of per-user cache when *yum* runs as a non-root user. The reason for this change is that in some cases users do not want to create and populate per-user cache, for example in cases where the space in the `$TMPDIR` directory is consumed by the user cache data.
Clone Of:
Environment:
Last Closed: 2018-04-10 15:05:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0845 0 None None None 2018-04-10 15:07:10 UTC

Description Supreet 2017-03-15 06:19:05 UTC
Description of problem:

The issue is where my /var/tmp partition gets filled up by users running yum search/list/whatever. 
Every user running yum get his own complete cache instead of using the system wide cache.It seems there is no configuration fix for this problem. This behavior leads to yum being unusable if /var/tmp is full.

So enhancement request is to have a configuration option so that all users use the root yum cache in /var/cache/yum

As a workaround is to discourage users from running yum with users other than root.

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux Server release 7.3 (Maipo)
# rpm -qa|grep yum
yum-plugin-priorities-1.1.31-40.el7.noarch
yum-plugin-versionlock-1.1.31-40.el7.noarch
yum-utils-1.1.31-40.el7.noarch
yum-3.4.3-150.el7.noarch
yum-metadata-parser-1.1.4-10.el7.x86_64
yum-rhn-plugin-2.0.1-6.el7.noarch

Actual results:
yum being unusable if /var/tmp is full.

Expected results:
Shouldn't be full

Additional info:
Have a configuration option so that all users use the root yum cache in /var/cache/yum

Comment 6 Karel Srot 2017-07-18 07:19:18 UTC
If we introduce an option to enforce the usage of root's cache for regular users,
would regular users be able to force the metadata download (again) e.g. via --setopt ? IMHO it would be reasonable.

Comment 7 Michal Domonkos 2017-07-18 13:26:26 UTC
(In reply to Karel Srot from comment #6)
> If we introduce an option to enforce the usage of root's cache for regular
> users,
> would regular users be able to force the metadata download (again) e.g. via
> --setopt ? IMHO it would be reasonable.

Good point, I think that's a good reason to make this a config option rather than a cmdline option so that users can override it with --setopt if they wish.  The default will probably stay the same (i.e. preload enabled), so they will be able to enable it again.

Comment 8 Klaas Demter 2017-07-19 07:48:36 UTC
Hi,
I have a question about the proposed possibility to allow a user to force metadata download. Do you want a user to be able to refresh the "global" cache in /var/cache/yum? That shouldn't be possible in yums current form because its not setuid and the cache is not writeable for other users than root.

Or do you simply want to enable them to override the "use root cache" option and fall back to the current behaviour of creating a user owned cache?

Greetings
Klaas

Comment 9 Michal Domonkos 2017-07-19 10:24:49 UTC
(In reply to Klaas Demter from comment #8)
> Hi,
> I have a question about the proposed possibility to allow a user to force
> metadata download. Do you want a user to be able to refresh the "global"
> cache in /var/cache/yum? That shouldn't be possible in yums current form
> because its not setuid and the cache is not writeable for other users than
> root.

Yup, that's correct, see below.

> 
> Or do you simply want to enable them to override the "use root cache" option
> and fall back to the current behaviour of creating a user owned cache?
> 
> Greetings
> Klaas

This.

I imagine the semantics of the new option to be something like "don't preload anything, just use the root cache directly", of which the opposite (and the default) is "preload stuff from the root cache to the user cache".

I'll have to think about it more deeply once I'm at it, though, but it probably will be done along these lines.

Comment 15 Michal Domonkos 2017-10-31 17:22:15 UTC
*** Bug 1500666 has been marked as a duplicate of this bug. ***

Comment 23 errata-xmlrpc 2018-04-10 15:05:56 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://access.redhat.com/errata/RHBA-2018:0845


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