• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    export unauthorized

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    9
    357
    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.
    • G
      geardog
      last edited by geardog

      This server is a fresh ubu 22.04 with fog 1.5.10.41, but as I’m having trouble getting data into fog and it behaving, I’ve removed fog files, dropped sql dbase, and reinstalled fog numerous times.

      1. On first install/config import the hosts and images appear, but the storage node info disappeared.

      2. I get an unauthorized page when trying to export host and image CSVs.

      3. Dropping failed sql dbase import and reinstalling fog brings back storage node info so I try manually entering the host and image info then exporting them for a “clean install,” but trying to export CSV gets an unauthorized page still.

      I’ve tried every un/pw combo I can find
      UN: root
      PW: xxx

      Desc.: local user
      UN: local_admin
      PW: xxx

      Desc.: Fog storage nodes
      UN: fogstorage
      PW: [as found in config gui]

      Desc.: TFTP server
      UN: fogproject
      PW: [as found in config gui]

      Desc.: initialiazation
      UN: fog
      PW: password

      Desc.: wiki tip
      UN: localhost
      PW: [blank]

      Desc.: wiki tip
      UN: local loopback
      PW: [blank]

      Desc.: wiki tip
      UN: localhost
      PW: [local user pw?]

      Desc.: wiki tip
      UN: local loopback
      PW: [local user pw?]

      and while I’ve read this
      https://wiki.fogproject.org/wiki/index.php?title=Migrate_FOG
      I’m trying to use the gui.

      I’d love to be able to export a CVS from my newly installed server, but … what gives?

      1 Reply Last reply Reply Quote 1
      • Tom ElliottT
        Tom Elliott @fogcloud
        last edited by

        @fogcloud @geardog
        Can you guys try dev-branch.

        I just pushed what I hope would fix this problem. (Version gathering as well)

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        AUTH IT CenterA G 2 Replies Last reply Reply Quote 0
        • AUTH IT CenterA
          AUTH IT Center
          last edited by

          I believe the problem you are facing is the way the new export.php (https://github.com/FOGProject/fogproject/compare/1.5.10...1.5.10.41?diff=split&w=#diff-ff9e620c45c9b82140dffca512e6417f03cc4972a20a6659a4f4a248ffa56082) validates the export.

          I have the same problem on a newly installed server OS: Ubuntu 22.04, FOG Server: 1.5.10.48. I changed the if statement with

          echo $currentUser;
          echo '<br>';
          echo strtolower($_SERVER['HTTP_X_REQUESTED_WITH']);
          echo '<br>';
          echo _('Unauthorized');
          exit;
          

          on export.php and as it shows

          User ID: 1 Name: fog
          
          Unauthorized
          

          the blank line is the empty variable which then forces the Unauthorized exit.

          G 1 Reply Last reply Reply Quote 1
          • G
            geardog @AUTH IT Center
            last edited by geardog

            @AUTH-IT-Center

            Thanks for that. I get the same result in my slightly newer version.
            I updated the post to show my OS and version.

            Tom ElliottT 1 Reply Last reply Reply Quote 0
            • Tom ElliottT
              Tom Elliott @geardog
              last edited by

              @geardog What are the steps (as verbose you can give) that you’re taking to try to export?

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

              Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

              Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

              1 Reply Last reply Reply Quote 0
              • F
                fogcloud
                last edited by

                Yup, I’m experiencing the same issue. New FOG install 1.5.10.74. Any attempt to export hosts or images to a CSV file results in a blank page with the word “Unauthorized”. Importing host and image CSV files does work though. Only exporting doesn’t work.

                Tom ElliottT 1 Reply Last reply Reply Quote 0
                • Tom ElliottT
                  Tom Elliott @fogcloud
                  last edited by

                  @fogcloud @geardog
                  Can you guys try dev-branch.

                  I just pushed what I hope would fix this problem. (Version gathering as well)

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  AUTH IT CenterA G 2 Replies Last reply Reply Quote 0
                  • AUTH IT CenterA
                    AUTH IT Center @Tom Elliott
                    last edited by

                    @Tom-Elliott

                    tested on staging server and it works.

                    OS: Ubuntu 22.04
                    FOG Server: 1.5.10.1577

                    Export of images and hosts now is successful

                    b22b7dcd-c424-4efd-a653-c848c107af05-image.png

                    Tom ElliottT 1 Reply Last reply Reply Quote 0
                    • [[undefined-on, Tom ElliottT Tom Elliott, ]]
                    • Tom ElliottT
                      Tom Elliott @AUTH IT Center
                      last edited by

                      @AUTH-IT-Center Thanks for letting me know.

                      I have created a class method that will do the authorization checks as well (meaning we call one line of code in scripts that need authorization check and its consistent across requests. So if we do have to tweak it later, we only have to adjust it in the one spot.

                      Thanks @geardog @fogcloud @AUTH-IT-Center For letting us know.

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                      1 Reply Last reply Reply Quote 0
                      • G
                        geardog @Tom Elliott
                        last edited by

                        @Tom-Elliott Thank you

                        Took me a while to circle back to this, but it’s nice to have it working as expected.

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post

                        215

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project