fmash16/ssg5

ftp -vo command not working

Closed this issue · 6 comments

Hello, this is my first time using shell commands. I'm using WSL with ubuntu installed, and I'm trying to run mkdir -p bin ftp -Vo bin/ssg5 https://rgz.ee/bin/ssg5 chmod +x bin/ssg5 but when I do that, in the second line I get ftp: V: unknown option.
What sould I do? Can I install this script in linux without using OpenBSD

Yes, you can surely run it on linux! "-v" was supposed to give a verbose output as the manpage says. You are using an uppercase V, it should be lowercase.
Edit: I found the typo on my blog, sorry for that :'( . Fixed it now.

If ftp doesn't work, you can use wget or curl, whichever you have installed and run the following instead of the ftp command:

mkdir -p bin && curl https://rgz.ee/bin/ssg5 > bin/ssg5 && chmod +x bin/ssg5

or

mkdir -p bin && wget https://rgz.ee/bin/ssg5 -P bin/ && chmod +x bin/ssg5

Ty for the quick answer! I'll tell you what I tried

  1. I wrote the command without uppercase
    mkdir -p bin && ftp -vo bin/ssg5 https://rgz.ee/bin/ssg5 && chmod +x bin/ssg5
    and the output is

ftp: o: unknown option

  1. I checked and I have installed both curl and wget
  2. Tried the command
    sudo mkdir -p bin && curl https://rgz.ee/bin/ssg5 > bin/ssg5 && chmod +x bin/ssg5
    with and withoud the sudo bit. The output is in both cases

-bash: bin/ssg5: Permission denied

  1. Tried the command
    sudo mkdir -p bin && wget https://rgz.ee/bin/ssg5 -P bin/ && chmod +x bin/ssg5
    both with and without sudo. In both cases I got the output

--2021-04-09 11:22:43-- https://rgz.ee/bin/ssg5
Resolving rgz.ee (rgz.ee)... 46.23.94.144, 2a03:6000:6f68:605::144
Connecting to rgz.ee (rgz.ee)|46.23.94.144|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5679 (5.5K) [text/plain]
bin/ssg5: Permission denied
Cannot write to ‘bin/ssg5’ (Success).

Ty for your help, maybe is a very basic error

Hey, I solved the installation problem. I just cloned the repository with git
git clone https://github.com/fmash16/ssg5

Edit: I would close the thread but I don't know how to commit the change. Do it yourself if you can

The problem you were facing was due to the sudo command. In bash && joins different commands on a single line. So running

sudo mkdir -p bin && curl https://rgz.ee/bin/ssg5 > bin/ssg5 && chmod +x bin/ssg5

what is actually being run is

sudo mkdir -p bin
curl https://rgz.ee/bin/ssg5 > bin/ssg5
chmod +x bin/ssg5

As you see, firstly, you are making the directory bin with sudo. So only root has write permission to the bin directory.
But, the next 2 commands are not run with sudo, but as user. But since user does not have write permission to the created bin directory, you are getting the permission denied error.

Using sudo was not necessary, if you were inside some directory owned by your user. Running without sudo should have worked. But once you run it with sudo, running the same command again without sudo won't work, unless you delete the created bin directory first.

The command was to download the original script, without the customisations I made.
By cloning my repo, you are using my customized script. Hope it works well for you. I will try adding a how to guide in the README file if anyone wants to use my modified script.

I am closing the issue here.

Ty for your help! I'm looking forward to using your script cause I need pandoc to compile extra LaTeX packages, and I'm working with a lot of equations. My idea is generating a simple blog like yours to upload my notes, classes, etc...

Thanks for wanting to use my customisations. I have updated the repo and made some changes to the script so that it works out of the box. I have also added some documentation to use the script. You can check it out.

Also, clone the repo once again as some changes have been made to the script, which otherwise wouldn't have worked properly out of the box. Thank you