Rust throwing "os error 13"

error: failed to load source for a dependency on `term`
Caused by:
  Unable to update registry ``
Caused by:
  failed to open: /opt/rust/cargo/registry/index/
Caused by:
  Permission denied (os error 13)

What is going on here? I listed “term” as a dependency. What’s error 13?

Edit: Lucky me! Someone else already had this error.

Where would I put these lines of code? In a file or something?