LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   "USER failed: Permission Denied" when apt-get update is run. How to login? (https://www.linuxquestions.org/questions/debian-26/user-failed-permission-denied-when-apt-get-update-is-run-how-to-login-4175609832/)

kazewind 07-14-2017 03:03 AM

"USER failed: Permission Denied" when apt-get update is run. How to login?
 
Hi guys, I am new to Linux.
As part of my learning process, I am currently trying to create an apt-get repository on my Debian server.
However I asked to have an added requirement which is to only allow specific users to login to this ftp server.

This is the screencap from the client trying to apt-get update from :
http://imgur.com/a/DjnfO

Requirements:
- (0) My server should run on 216.75.54.250 (Internal Network ip)
- (1) FTP server should prevent anonymous login and permit only User01 to login to FTP service
- (2) Set up an apt-get repository where other servers within the LAN can install packages. Software packages shall be served via ftp at ftp://<server>/packages/

What I have tested [results]:
- apt-get update from server via http apache (apache is linked to the same <root>/packages) [Works]
- apt-get update from server via ftp WITHOUT doing requirement (1) [Works - This suggests that requirement (2) is successful]
- "ftp -p 216.75.54.250" and login as User01 WITH requirement (1) done [Works]

frankbell 07-14-2017 09:22 PM

Are you using su to become root before issuing the apt-get commands.

Note that, unlike the *buntus, Debian does not configure sudo at time of install. This is standard outside of the *buntu-verse.

jens 07-17-2017 09:09 AM

I'm highly confused with your screenshot.

While your user is called "root", your CLI shows a normal/restricted user login.

Did create a normal user with the name "root"? (didn't even know that was possible, that's why sudo exists)
Is this really your system/root prompt or are you using some weird remote control thingy?
Could you post your user configuration (excluding whatever you don't like to be public)?

PS: Also note that some things did change (including ftp access, try the usual https://ftp with a known to be working mirror)

AwesomeMachine 07-21-2017 12:52 AM

It's a permissions problem in the ftp server. Did you build the mirror as root?

kazewind 08-03-2017 10:25 AM

Sorry all for late reply - Solved
 
The solution was

vi /etc/apt/sources.list
deb ftp://User01: password@216.75.54.250:/ /

AwesomeMachine 08-03-2017 03:32 PM

That passes the password as clear text.


All times are GMT -5. The time now is 03:59 AM.