How to replace files?
-
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!
-
@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?
-
@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. -
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
-
@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? -
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.
-
Thank you!!!!
-
@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!)