Puis-je remplir des demandes yum En tant qu'utilisateur non privilégié?

Je suggérerais que comme un utilisateur non privilégié, je ne peux pas

yum install

ou

yum update

, Et cela est compréhensible. Mais je pensais pouvoir

yum search

ou

yum whatprovides

. Ces commandes ne devraient apporter aucune modification à mon système local et demander simplement ce qui est dans les référentiels.

En essayant de courir

yum search

ou

yum whatprovides

Cependant, en tant qu'utilisateur non privilégié, je reçois un message d'erreur, par exemple:

bash-4.2$ yum search openssh-server
ovl: Error while doing RPMdb copy-up:
[Errno 13] Permission denied: '/var/lib/rpm/.dbenv.lock'


One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).

3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...

4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:

yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>

5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find repomd.xml file for rhel7-x86_64-730
bash-4.2$

Après se connecter comme root et chmoding c'est

.dbenv.lock

sur 666, Maintenant, mon utilisateur non privilégié peut

yum search

mais non

yum whatprovides

.

bash-4.2$ yum search openssh-server
Loaded plugins: ovl, product-id, search-disabled-repos
ovl: Error while doing RPMdb copy-up:
[Errno 13] Permission denied: '/var/lib/rpm/__db.002'
========================= N/S matched: openssh-server ==========================
gsi-openssh-server.x86_64 : SSH server daemon with GSI authentication
openssh-server.x86_64 : An open source SSH server daemon
openssh-server-sysvinit.x86_64 : The SysV initscript to manage the OpenSSH
: server.

Name and summary matches only, use "search all" for everything.
bash-4.2$

bash-4.2$ yum whatprovides sshd
Loaded plugins: ovl, product-id, search-disabled-repos
ovl: Error while doing RPMdb copy-up:
[Errno 13] Permission denied: '/var/lib/rpm/__db.002'


One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).

3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...

4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:

yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>

5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Caching enabled but no local cache of /var/cache/yum/x86_64/7Server/rhel7-x86_64
-730/856d5d541d62809b07538e7b8b666e115e9871a9-filelists.sqlite.bz2 from rhel7-x8
6_64-730
bash-4.2$

C'est parce que yum Téléchargera automatiquement les données dans le cache lors d'une telle opération de requête et échoue si le cache n'est pas disponible pour l'enregistrement? Quels sont les droits d'accès aux fichiers i (comme root) doit fournir aux utilisateurs non privilégiés afin qu'ils puissent exécuter ces demandes de miam (Par exemple, l'accès à l'écriture sur certains dossiers de Kesha)?

PS: root peut

yum install

Tout est en ordre, ce n'est donc pas un problème de connexion au serveur de référentiel yum En tant que tel.

Edit: Après avoir changé tous les fichiers

/var/lib/rpm

Catalogue 666, ainsi que l'arrêt

ovl

Plugin, je ne reçois pas d'erreurs initiales lors du démarrage

yum

, Mais je ne peux toujours pas courir

yum whatprovides

:

bash-4.2$ yum --disableplugin=ovl whatprovides apropos                          
Loaded plugins: product-id, search-disabled-repos


One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).

3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...

4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:

yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>

5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Caching enabled but no local cache of /var/cache/yum/x86_64/7Server/rhel7-x86_64
-730/856d5d541d62809b07538e7b8b666e115e9871a9-filelists.sqlite.bz2 from rhel7-x8
6_64-730

</repoid></repoid></repoid></repoid></repoid></repoid></repoid></repoid></repoid></repoid></repoid></repoid>
Invité:

Giselle

Confirmation de:

Nouvelles versions yum vous permettent d'effectuer des opérations non obstrissantes pour le compte d'un utilisateur régulier. Dans les anciennes versions, vous devrez utiliser

repoquery

Au lieu de B.

yum-utils

paquet.

De plus, il semble que le problème provoque un plugin ovl, mais non yum En tant que tel. Tu peux y aller

--disableplugin=ovl

Pour le désactiver temporairement.

Pour répondre aux questions, connectez-vous ou registre