background
I got hold of an ubuntu box on AWS, and I was following the instructions to install a mattermost server. Things were going smooth until I reached this part:
For the purposes of this guide we will assume this server has an IP address of 10.10.10.2 (note: i'm using local host instead ie 127.0.0.0)
- Create a user and group for running mattermost:
sudo useradd --create-home --user-group --system mattermost
- Change to the account of the new user:
sudo --user=mattermost --shell
- Change into the home of the new user:
cd
Download any version of the Mattermost Server by typing:
wget https://releases.mattermost.com/X.X.X/mattermost-X.X.X-linux-amd64.tar.gz
The last link should be replaced by this one
https://releases.mattermost.com/3.6.0/mattermost-team-3.6.0-linux-amd64.tar.gz
which naturally can be easily downloaded from chrome.
problem
When I try to download that file from CLI:
wget https://releases.mattermost.com/X.X.X/mattermost-X.X.X-linux-amd64.tar.gz
I get the following:
--2017-01-17 07:22:36-- https://releases.mattermost.com/X.X.X/mattermost-X.X.X-linux-amd64.tar.gz Resolving releases.mattermost.com (releases.mattermost.com)... 54.192.192.48, 54.192.192.69, 54.192.192.118, ... Connecting to releases.mattermost.com (releases.mattermost.com)|54.192.192.48|:443... connected. HTTP request sent, awaiting response... 403 Forbidden 2017-01-17 07:22:36 ERROR 403: Forbidden.
what I have tried
At this point I obviously don't have a password for the user mattermost
.. so I exit the shell and give them a password:
$ sudo passwd mattermost
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
but then when I jump back to the mattermost
shell and try to be a wise guy:
$ sudo wget https://releases.mattermost.com/3.6.0/mattermost-team-3.6.0-linux-amd64.tar.gz
[sudo] password for mattermost:
mattermost is not in the sudoers file. This incident will be reported.
So i'm not exactly sure what to do here. Why do I need to be sudo to download a publicly available file anyways?
note: i just realized that the same error happens even if i'm root on that aws box
wget -P /tmp https://releases.mattermost.com/3.6.0/mattermost-team-3.6.0-linux-amd64.tar.gz
to save in/tmp/
. Also every user has write permission on his/her home, perhaps you are running from a directory that the user does not have permission to write on.