Why do I need sudo to run apt-mirror? Is there a way to run apt-mirror without sudo?
Asked
Active
Viewed 374 times
0
a06e
- 12,613
- 25
- 66
- 102
-
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 Answers
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
- 33,802
- 20
- 111
- 168