Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How to replace files?

    Scheduled Pinned Locked Moved General pfSense Questions
    8 Posts 3 Posters 726 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pfguy2018
      last edited by

      I am trying to update the NUT package as outlined in post 133 on this thread, but am stumped as to how to carry out the following steps: "Move the files in appropriate directories and make sure to have appropriate file permission or CHMOD 755"

      I have asked for help a couple of times there but the requests were ignored. Hoping someone here can help me with the appropriate commands on the Command Prompt page? Thanks in advance!

      P 1 Reply Last reply Reply Quote 0
      • P
        Popolou @pfguy2018
        last edited by

        @pfguy2018 You can simply do this via the console, via SSH (if enabled) or if you're more comfortable with a GUI, WinSCP. The step to "CHMOD 755" is to simply make the files read/write/executable and can also happen via the console or via WinSCP. Presumably, any of these options would be new to you?

        P 1 Reply Last reply Reply Quote 1
        • P
          pfguy2018 @Popolou
          last edited by

          @Popolou
          Thanks for the response.
          I am trying to use the "Execute Shell Command" box on the pfSense Command Prompt page (in the GUI under Diagnostics - Command Prompt) to do this (assuming it is possible). Looking for the exact commands to enter there to accomplish these steps.

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            It would be much better to do this via the CLI rather than the GUI command prompt. In the gui you can't see what's happening if the wrong thing happens. You also have to be careful not to run something hat never returns to avoid hanging the gui.

            Steve

            P 1 Reply Last reply Reply Quote 0
            • P
              pfguy2018 @stephenw10
              last edited by

              @stephenw10
              Thanks. Can you tell me what specific commands I would need to use in the console to move file xyz from a tmp directly to the desired location, and then to apply the correct file permissions to the file?

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                Fetch the required files:

                [2.7.2-RELEASE][admin@t70.stevew.lan]/tmp: fetch https://forum.netgate.com/assets/uploads/files/1703721460603-upsmon.gz
                1703721460603-upsmon.gz                                 35 kB   18 MBps    00s
                [2.7.2-RELEASE][admin@t70.stevew.lan]/tmp: fetch https://forum.netgate.com/assets/uploads/files/1703721460645-usbhid-ups.gz
                1703721460645-usbhid-ups.gz                            108 kB  488 kBps    01s
                

                Extract them to the correct locations:

                [2.7.2-RELEASE][admin@t70.stevew.lan]/tmp: gunzip -c 1703721460603-upsmon.gz > /usr/local/sbin/upsmon
                [2.7.2-RELEASE][admin@t70.stevew.lan]/tmp: gunzip -c 1703721460645-usbhid-ups.gz > /usr/local/libexec/nut/usbhid-ups
                

                Set the file permissions:

                [2.7.2-RELEASE][admin@t70.stevew.lan]/tmp: chmod 0755 /usr/local/sbin/upsmon /usr/local/libexec/nut/usbhid-ups
                

                Restart the NUT service in the GUI.

                P 2 Replies Last reply Reply Quote 1
                • P
                  pfguy2018 @stephenw10
                  last edited by

                  @stephenw10

                  Thank you!!!!

                  1 Reply Last reply Reply Quote 0
                  • P
                    pfguy2018 @stephenw10
                    last edited by

                    @stephenw10
                    Unfortunately the NUT service would not restart after all this. I had to delete the package and reinstall. I think I should just wait for the officially updated package (hopefully to be released soon!)

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.