Announcement

Collapse
No announcement yet.

Can't copy files to /opt - even with sudo

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can't copy files to /opt - even with sudo

    I am new to Linux.

    I have been trying to install Webstorm to kubuntu 18.04LTS. Jetbrains doesn't ofer a .deb file. They only offer a tarball.

    The jetbrains docs say to copy the files to the /opt directory.

    I have downloaded the tarball. I can extract it to my downloads folder by double-clicking, but NOT by terminal.

    I cannot copy/move/download the webstorm tarball or its extracted files to my /opt folder by any means

    Jetbrains docs are here:
    https://www.jetbrains.com/help/idea/...p-product.html

    I have tried:

    (per Jetbrains docs)

    ` sudo tar xf -*.tar.gz -C /opt/ ` (per Jetbrains docs)

    Error: tar: -*.tar.gz: Cannot open: No such file or directory

    `sudo tar xf -Webstorm-2018.2.6.tar.gz -C /opt/`

    Error: tar: -Webstorm-2018.2.6.tar.gz: Cannot open: No such file or directory

    I have switched to root using:

    `sudo -i`
    and

    `sudo su`

    I have followed the LinuxHelp.com tutorial (wget receives 403 forbidden error).

    Nothing I have tried has worked and I'm getting extremely frustrated. Can someone please help me understand what's going wrong and how to fix it?

    #2
    Assuming that your download directory is ~/Downloads, cd into that directory and enter:
    Code:
    ls -al -Webstorm-2018.2.6.tar.gz
    and then try it without the leading "-" on the filename such as
    Code:
    ls -al Webstorm-2018.2.6.tar.gz
    then post the results in a CODE BOX here.
    The next brick house on the left
    Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.24.7 | Kubuntu 22.04.4 | 6.5.0-28-generic


    Comment


      #3
      I solved this. I don't understand why this works, but it works:

      When I type the name out, it doesn't work. If I use the `ls` command to get the contents of the Downloads directory, and use the mouse to copy and paste the file name, it works. I double checked to make sure I wasn't mistyping the name by copying each value into an ascii comparator and the values were identical. So I don't understand why it should be different.

      Comment


        #4
        Originally posted by jglen490 View Post
        Assuming that your download directory is ~/Downloads, cd into that directory and enter:
        Code:
        ls -al -Webstorm-2018.2.6.tar.gz
        and then try it without the leading "-" on the filename such as
        Code:
        ls -al Webstorm-2018.2.6.tar.gz
        then post the results in a CODE BOX here.
        hoo@TARDIS:~$ cd Downloads
        hoo@TARDIS:~/Downloads$ ls -al -Webstorm-2018.2.6.tar.gz
        ls: invalid option -- 'W'
        Try 'ls --help' for more information.
        hoo@TARDIS:~/Downloads$ ls -al Webstorm-2018.2.6.tar.gz
        ls: cannot access 'Webstorm-2018.2.6.tar.gz': No such file or directory
        hoo@TARDIS:~/Downloads$ ls
        ksmoothdock_5.11-1_amd64.deb 'Latte Dinamico.layout.latte' WebStorm-182.5107.19 WebStorm-2018.2.6.tar.gz
        hoo@TARDIS:~/Downloads$ ^C
        hoo@TARDIS:~/Downloads$ ls -al WebStorm-2018.2.6.tar.gz
        -rw-rw-r-- 1 hoo hoo 254581032 Jan 24 11:34 WebStorm-2018.2.6.tar.gz

        The last one was where I copy and pasted the name from the ls command.

        btw, I appreciate you taking the time to post and help me to understand this. It's really baffling me.
        Last edited by TwoFistedJustice; Jan 25, 2019, 08:00 PM. Reason: saying thanks.

        Comment


          #5
          Originally posted by TwoFistedJustice View Post
          sudo tar xf -*.tar.gz -C /opt/

          sudo tar xf -Webstorm-2018.2.6.tar.gz -C /opt/`
          Your commands have an extra "-" that doesn't belong. The install page I found reads:
          Code:
          sudo tar xfz WebStorm-*.tar.gz -C /opt/
          (The z is not necessary, tar will work that out from the file.)

          So the problem you present is a typo, not a permissions problem with /opt.

          [Edit] well, it looks like I was a bit slow in composing my reply, and by the time I posted you had solved things. I too was baffled by firefox not giving a name for the download, there's something it didn't like about the file name, I think, but I can't see what's wrong with "WebStorm-2018.3.3.tar.gz". So, take heart, it shouldn't have been so baffling.
          Last edited by jlittle; Jan 25, 2019, 08:19 PM. Reason: I was too slow
          Regards, John Little

          Comment


            #6
            Yep, not sure either, but the gzip file is spelled differently now. It has an upper case "S" in the name that apparently wasn't there before. Anyway, if it works it's all good!
            The next brick house on the left
            Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.24.7 | Kubuntu 22.04.4 | 6.5.0-28-generic


            Comment


              #7
              That would be correct. The OP originally 'typed' the file name without the uppercase S in the name. Linux is case sensitive, thus the file not found result.
              Using Kubuntu Linux since March 23, 2007
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                OHHHHH - I see the 'S' now.

                Stupid PascalCase! :-)

                Thank you all for helping me!
                Last edited by TwoFistedJustice; Jan 25, 2019, 09:02 PM.

                Comment


                  #9
                  Special maybe

                  Linux is case sensitive, so you can have a lot more file names!!
                  The next brick house on the left
                  Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.24.7 | Kubuntu 22.04.4 | 6.5.0-28-generic


                  Comment


                    #10
                    Quick tip, use the shells tab-completion to write out filenames (it saves the time of typing them and protects from misspelling). So type a few letters of the file name and hit tab and the shell will complete the filename for you (if it doesn't, there are likely more than one match...and if that's the case, hit tab again and the shell will show you the options available).

                    These instructions are for the default bash shell, but tab-completion works for basically all modern shells, although there can be a few differences in how they operate and how they are configured.

                    Comment

                    Working...
                    X