0

Why do I need sudo to run apt-mirror? Is there a way to run apt-mirror without sudo?

a06e
  • 13,223
  • 26
  • 70
  • 104
  • Because it is an instruction for administrators and not for a user. We believe in a strict separation of tasks and if it is for admin it requires sudo. Why does it bother you to type 5 extra characters and a password? Regarding your question: see http://askubuntu.com/questions/192050/how-to-run-sudo-command-with-no-password on how to do this. – Rinzwind Nov 26 '14 at 16:00
  • What is that apt-mirror does that requires admin rights? I just want to download a copy of the repository to my local PC. Why is that an administrator's task? I understand that installing something from that repository requires sudo, but just making a copy of the files shouldn't require admin. – a06e Nov 26 '14 at 16:18

1 Answers1

1

apt-mirror uses port 21 [courtesy of ProFTPd] (all ports below 1024 require root), and stores information in /etc, /var, or /opt. As none of these locations are user-writable, sudo is required.

You may be able to get away by making apt-mirror store to a place you have write-access to, such as /home/$USER/.local-repo. sudo will still be needed to install programs from your mirror, though.

ProFTPd runs as a daemon, so you won't need to worry about that.

Kaz Wolfe
  • 34,122
  • 21
  • 114
  • 172