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

    Images won't be deleted in filesystem when using the webui delete option

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    9
    874
    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
      processor
      last edited by

      Hi,

      I’m using FOG server 1.5.5 on ubunbtu 16.04.
      My storage is made of iSCSI LUNS.

      I can create image without any issue but deleting them via the webUI won’t delete them on the filesystem.

      I found this in the apache log, but not sure it’ll help :

      [Thu May 23 09:13:45.814151 2019] [proxy_fcgi:error] [pid 29322] [client 10.33.0.63:32884] AH01071: Got error 'PHP message: PHP Warning:  trim() expects parameter 1 to be string, array given in /var/www/html/fog/lib/fog/fogbase.class.php on line 1382\n', referer: http://10.33.0.11/fog/management/index.php?node=image&sub=deletemulti
      

      Another strange thing :

      the images folder are sometimes own by fog:root, 1002:root or root:root.
      The folder containing all other images folder belong to 1002:root.

      I suppose my problem is a owner issue, so what should be the right owner.

      1 Reply Last reply Reply Quote 0
      • T
        Taspharel
        last edited by

        I noticed the same thing some time ago, but wasnt sure it always happened so never reported it. Didnt try for some time to delete an image though.

        1 Reply Last reply Reply Quote 0
        • Q
          Quazz Moderator
          last edited by

          Versions before 1.5.6 : folders should be owned by fog:root

          1.5.6 and newer: folders should be owned by fogproject:root

          P 1 Reply Last reply Reply Quote 0
          • P
            processor @Quazz
            last edited by processor

            @Quazz
            My setup is now updated from 1.5.5 to 1.5.6.
            It’s very strange, once created, some are now belonging to fogproject:root and other to root:root.
            And no matter whom they belong to, a delete through the webui does not remove them from the drive.

            Any Idea?

            1 Reply Last reply Reply Quote 0
            • P
              processor
              last edited by

              A little up for this remaining issue.

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by

                @processor I have not had enough time to look into this. Thanks for upping the topic.

                I would suggest you run chown -R fogproject:root /images to have it all set properly for now.

                In the URL you posted I see “sub=deletemulti”. I think that this is intended behavior that files won’t be deleted from disk if you delete multiple images in one go. See here: https://forums.fogproject.org/topic/12714/option-to-delete-files-when-deleting-multiple-images-snapins

                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

                P 1 Reply Last reply Reply Quote 1
                • P
                  processor @Sebastian Roth
                  last edited by

                  @Sebastian-Roth
                  no worries.

                  I already tried what you suggested and it did not helped unfortunately.
                  I did not noticed the “deletemulti” in the url. To be sure I tried again with one
                  image only and strangely the result is exactly the same :

                  [Wed Jun 26 17:03:26.511411 2019] [proxy_fcgi:error] [pid 28204] [client 10.33.0.200:39938] AH01071: Got error 'PHP message: PHP Warning:  trim() expects parameter 1 to be string, array given in /var/www/html/fog/lib/fog/fogbase.class.php on line 1386\n', referer: http://10.33.0.11/fog/management/index.php?node=image&sub=deletemulti
                  

                  whereas this time I’m sure I did not check more than one image.

                  for info my images are not stored in /images but in /mnt/FOG_iSCSI (mounted iSCSI LUN) so of course I adapted the chown to my configuration.

                  1 Reply Last reply Reply Quote 0
                  • S
                    Sebastian Roth Moderator
                    last edited by Sebastian Roth

                    @processor said in Images won't be deleted in filesystem when using the webui delete option:

                    To be sure I tried again with one image only and strangely the result is exactly the same.

                    Ahhh, here we go! It’s still a “multidelete” if you do it the checkbox delete way. The other way to delete an image is by going into the image settings as if you’d like to edit things. Then at the top there are four tabs: Info, General, Storage Group, Membership and Delete. Take this route and you should see the image files being removed as well if you select the checkbox “Delete files”…

                    Edit: As well I cannot replicate the PHP warning “trim() expects parameter 1 to be string, array given”, so not sure what to do about it. It’s not causing the issue I am sure.

                    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

                    P 1 Reply Last reply Reply Quote 0
                    • P
                      processor @Sebastian Roth
                      last edited by

                      @Sebastian-Roth

                      it worked ! Many thanks I did not even noticed this tab!

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

                      256

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project