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

Executing command or script

Scheduled Pinned Locked Moved General pfSense Questions
4 Posts 2 Posters 2.0k 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.
  • F
    fr0t
    last edited by Sep 15, 2016, 3:03 PM

    [2.3.2-RELEASE][root@pfSense.localdomain]/root: ls -la s*

    -rwxrwxrwx  1 root  wheel  82448 Sep 29  2009 sendEmail.pl

    [2.3.2-RELEASE][root@pfSense.localdomain]/root: ./sendEmail.pl

    ./sendEmail.pl: Command not found.

    ============================================

    [2.3.2-RELEASE][root@pfSense.localdomain]/root: mv sendEmail.pl /usr/local/bin/sendEmail

    [2.3.2-RELEASE][root@pfSense.localdomain]/root: sudo sendEmail

    sudo: unable to execute /usr/local/bin/sendEmail: No such file or directory

    ============================================

    WTF?

    Regards
    fr0t

    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Sep 15, 2016, 6:14 PM

      First, a word of caution: Don't copy and run scripts on your firewall from untrusted sources. Or just don't do it at all. It's a firewall, anything added in that way is a security concern.

      Now that the disclaimer is out of the way:
      The error you see means whatever interpreter it has in the shabang line (#!) at the top of the script does not exist. In that case, it's probably pointing to the wrong path for perl (usually this happens when someone copies a Linux-specific script to FreeBSD…). Edit the file and fix the path to point to the correct interpreter.

      That or the file has non-UNIX line terminators

      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      1 Reply Last reply Reply Quote 0
      • F
        fr0t
        last edited by Sep 16, 2016, 12:59 PM

        Thanks for explaining,

        First: I wouldn't use 3 party scripts if pfSense would have the facility what I am looking for. Basically I am emailing config every hour using crone just for backup purpose in case HDD fail or something else.

        Second: Thanks for solution, correcting path to perl fixed the problem. I was in rush last night and my head was not functioning as supposed.

        Regards
        fr0t

        1 Reply Last reply Reply Quote 0
        • J
          jimp Rebel Alliance Developer Netgate
          last edited by Sep 16, 2016, 1:02 PM

          Sending your config via e-mail is highly insecure and a questionable practice. There are much better ways to accomplish regular backups:

          https://doc.pfsense.org/index.php/AutoConfigBackup

          or

          https://doc.pfsense.org/index.php/Remote_Config_Backup

          But that's a topic for new different thread.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          4 out of 4
          • First post
            4/4
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received