1

I have a host where the yum.repos.d directory contains a yum repository definition file that has a password protected repository and so has a plain text username and password.

This is not a big deal since this host does not have user accounts other than the administrator with sudo privileges. However, I had the urge to make this file readable to root only, and I realized right away I couldn't do that:

Error: Error accessing file for config file://///etc/yum.repos.d/myrepo.repo

Which makes sense, but now I am curious if yum was designed to allow something like user profiles.

How can I have a repository configuration file which is only loaded under a certain user? If this is not possible, does that mean that all users of a system must share all the repository definitions? If I had a private repository for which I did not want to share the password, am I forced to delete that repository definition file after using the repository?

-1

How can I have a repository configuration file which is only loaded under a certain user?

For that you can use , user permissions. If you have two users and that configuration file should not allowed for that user then you dont give read & execute permissions to other users.

  • Setting the read permissions results in every user receiving the error I mentioned in my question whenever they run any yum command without sudo. – Ed I Nov 3 '13 at 7:31
  • yes that means those particular updates/applications are not available , you can ignore that error. – rɑːdʒɑ Nov 3 '13 at 7:48
  • I could, but... Maybe you're a bigger man than me. – Ed I Nov 3 '13 at 19:53
  • @EdSaito what didnt get you ?? – rɑːdʒɑ Nov 4 '13 at 11:50
  • Well, I don't get how it doesn't bother you. "To each its own". I didn't downvote you by the way. – Ed I Nov 4 '13 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.