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

Installer Bug - no home directory check for 'fog' user

Scheduled Pinned Locked Moved
FOG Problems
3
9
1.2k
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.
  • D
    Darrin Enerson
    last edited by Aug 1, 2016, 5:19 PM

    I noticed a bug/omission on the RC5 installer when upgrading this morning due to a mistake on my part from prior troubleshooting. If an admin has deleted the home directory for the ‘fog’ user but left the user account otherwise intact the installer doesn’t recreate the home directory when checking if the ‘fog’ user account is configured. This causes image captures to fail with an ftp error when the script tries to switch to /home/fog (which doesn’t exist). Recreating /home/fog and changing ownership/group to ‘fog’ fixes the issue. I can provide the exact error message from the httpd ‘error_log’ file if needed as well.

    1 Reply Last reply Reply Quote 0
    • W
      Wayne Workman
      last edited by Aug 1, 2016, 5:23 PM

      Good find.

      Here’s the fix, that I suggest be included in the installer.

      if [[ ! -d /home/fog ]]; then
          mkdir /home/fog
          chown -R fog:fog /home/fog
      fi

      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!
      Daily Clean Installation Results:
      https://fogtesting.fogproject.us/
      FOG Reporting:
      https://fog-external-reporting-results.fogproject.us/

      1 Reply Last reply Reply Quote 0
      • T
        Tom Elliott
        last edited by Aug 1, 2016, 5:23 PM

        The expectation that FOG create the fog user home directory is out of scope. If an administrator is deleting a folder (whether known or not, it’s outside the scope of the installer).

        This, I think, should be made aware of, but not be handled directly by the installer. If you decide to delete the /home/fog folder, you should be aware of what issues it may cause.

        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

        W 1 Reply Last reply Aug 1, 2016, 5:24 PM Reply Quote 0
        • W
          Wayne Workman @Tom Elliott
          last edited by Aug 1, 2016, 5:24 PM

          @Tom-Elliott With all the backups going into /home and being named with names like ‘fog’ it’s really easy for a new person to just delete everything in there unknowingly. I did it like twice so far, and I’m seasoned. Of course I figured it out and fixed it, but still.

          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!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          T 1 Reply Last reply Aug 1, 2016, 5:25 PM Reply Quote 0
          • T
            Tom Elliott @Wayne Workman
            last edited by Aug 1, 2016, 5:25 PM

            @Wayne-Workman I realize I default to /home as the backup, because that’s most likely where the space is going to be. But you really should be aware of WHAT you’re deleting.

            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

            W 1 Reply Last reply Aug 1, 2016, 5:26 PM Reply Quote 0
            • W
              Wayne Workman @Tom Elliott
              last edited by Aug 1, 2016, 5:26 PM

              @Tom-Elliott I am, after making the mistake and figuring it out.

              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!
              Daily Clean Installation Results:
              https://fogtesting.fogproject.us/
              FOG Reporting:
              https://fog-external-reporting-results.fogproject.us/

              1 Reply Last reply Reply Quote 0
              • T
                Tom Elliott
                last edited by Aug 1, 2016, 5:41 PM

                I disagree with this being a bug.

                While I understand the problem it causes, this is purely administrative at that point. While, sure it’s simple enough to add that kind of a thing, maybe you ACTUALLY did intend to delete the fog user folder? VSFTPD can be configured independently and you can direct it where to login first.

                Mistakes happen, but that’s all the more reason for you to be mindful of what you’re doing.

                If you accidentally make the mistake of running rm -rf / there isn’t a utility to undo it. You still have to be aware of what you’re doing.

                Mistakes happen. I will add check that warns people, essentially saying, hey I can’t find the home folder. But I’m not going to recreate. As I said, maybe the deletion was intentional.

                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
                • D
                  Darrin Enerson
                  last edited by Aug 1, 2016, 5:49 PM

                  After reading Tom’s reasoning I tend to agree with the warning instead of recreation. I knew what I was doing when I deleted it and simply forgot to recreate it before continuing testing today. The warning would have given me a nice reminder to fix what I broke :).

                  T 1 Reply Last reply Aug 1, 2016, 5:58 PM Reply Quote 0
                  • T
                    Tom Elliott @Darrin Enerson
                    last edited by Aug 1, 2016, 5:58 PM

                    @Darrin-Enerson I’ve added the warning and an example method to correct the issue, I think, in a more proper method. This warning will be available for the RC6 (Hopefully it can just be 1.3.0 at that point, but meh.)

                    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
                    • 1 / 1
                    1 / 1
                    • First post
                      5/9
                      Last post

                    151

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project