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

    Problem with 'permission denied' after FOG server restart

    Scheduled Pinned Locked Moved
    FOG Problems
    5
    30
    11.1k
    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.
    • S
      Sebastian Roth Moderator
      last edited by

      Please run ‘sudo exportfs -a’ on the FOG server. Error message like the one you see in the web interfaces occour if there is no image stored in ‘/images/<name-of-image>’. Maybe you never uploaded one or it went missing. ‘ls -al /images’…

      EDIT: And please make sure nfs client is installed (debian/ubuntu: sudo apt-get install nfs-common) on that machine that you run the tests from!

      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
      • mecsrM
        mecsr
        last edited by

        The image files are all there right sizes and all.
        exportfs -a gave a bunch of errors

        [url=“/_imported_xf_attachments/1/1725_exportfs -a.PNG?:”]exportfs -a.PNG[/url]

        1 Reply Last reply Reply Quote 0
        • mecsrM
          mecsr
          last edited by

          I just installed nfs-common on mount test machine and I got a more detailed failure.

          Edit: Oh an my permissions are currently set to 777 for the /images folder for the sake of testing.
          Typically I have them set to 775
          owner and group is fog
          I have also tried setting the group to www-data

          [url=“/_imported_xf_attachments/1/1726_mount attempt.PNG?:”]mount attempt.PNG[/url]

          1 Reply Last reply Reply Quote 0
          • mecsrM
            mecsr
            last edited by

            Well I feel dumb,
            I just had to edit the etc/exports file after updating to say
            /images …
            and
            /images/dev…
            instead of
            y…
            and
            y/dev…

            Not sure why it changed itself to y as the images directory, it looks like everything is working now. Thanks again for all your help.

            Thanks,
            -JJ

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

              Who would’ve thought that it were wrong entries in /etc/exports… Sounds a bit like you hit the wrong keys when installing FOG. When the installer asked for the path you gave ‘y’ for ‘yes’ maybe…

              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
              • H
                haste347
                last edited by

                Alright, from a workstation on the same subnet I tried the commands you listed…here are the results.

                root@VEI-3000D:~# sudo mkdir -p /mnt/nfstest && mount -v 10.0.2.250:/images /nfstest
                mount: no type was given - I’ll assume nfs because of the colon
                mount: mount point /nfstest does not exist

                root@VEI-3000D:~# sudo umount /nfstest
                umount: /nfstest: not found

                root@VEI-3000D:~# sudo mount -v 10.0.2.250:/images/dev /nfstest
                mount: no type was given - I’ll assume nfs because of the colon
                mount: mount point /nfstest does not exist

                root@VEI-3000D:~# umount /nfstest && rmdir /nfstest
                umount: /nfstest: not found

                And, just for further testing to eliminate the folder not being there, I tried to mount to the /images folder.

                root@VEI-3000D:~# sudo mount -v 10.0.2.250:/images
                mount: can’t find 10.0.2.250:/images in /etc/fstab or /etc/mtab
                root@VEI-3000D:~#

                Thank you again for your help!!!

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

                  Was probably pretty late when I wrote this post… My fault, shoud be like this:
                  [CODE]mkdir -p /mnt/nfstest && mount -v 10.0.2.250:/images /mnt/nfstest
                  umount /mnt/nfstest
                  mount -v 10.0.2.250:/images/dev /mnt/nfstest
                  umount /mnt/nfstest && rmdir /mnt/nfstest[/CODE]
                  Can you see the difference? By the way… what is the IP address of your FOG server?

                  [B]And please make sure that ‘nfs-common’ (debian/ubuntu) or ‘nfs-utils’ and ‘nfs-utils-lib’ (centos) packages are installed before you try this!![/B]

                  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
                  • mecsrM
                    mecsr
                    last edited by

                    [quote=“Uncle Frank, post: 42937, member: 28116”]Who would’ve thought that it were wrong entries in /etc/exports… Sounds a bit like you hit the wrong keys when installing FOG. When the installer asked for the path you gave ‘y’ for ‘yes’ maybe…[/quote]

                    Well I actually just used the script I had posted in these forums that I made when .33b was still the dev.
                    I guess something changed in the installer for the images path not defaulting to /images with a y?

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

                      It’s a default to set /images or whatever value you type in.

                      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
                      • H
                        haste347
                        last edited by

                        My fog servers IP is 10.0.2.250

                        Yes! There is now a difference with those commands. They seem to be working now! (I did have to install nfs-common on the workstation).

                        root@VEI-3000D:/home/administrator# sudo mkdir -p /mnt/nfstest && mount -v 10.0.2.250:/images /mnt/nfstest
                        mount: no type was given - I’ll assume nfs because of the colon
                        mount.nfs: timeout set for Wed Mar 4 11:14:44 2015
                        mount.nfs: trying text-based options ‘vers=4,addr=10.0.2.250,clientaddr=10.0.2.153’

                        root@VEI-3000D:/home/administrator# sudo umount /mnt/nfstest

                        root@VEI-3000D:/home/administrator# sudo mount -v 10.0.2.250:/images/dev /mnt/nfstest
                        mount: no type was given - I’ll assume nfs because of the colon
                        mount.nfs: timeout set for Wed Mar 4 11:15:30 2015
                        mount.nfs: trying text-based options ‘vers=4,addr=10.0.2.250,clientaddr=10.0.2.153’

                        root@VEI-3000D:/home/administrator# sudo umount /mnt/nfstest && rmdir /mnt/nfstest
                        root@VEI-3000D:/home/administrator#

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

                          Are you sure you still get the same error when booting into FOG??

                          From what I can see NFS seems to be alright. But please run another test:
                          [CODE]sudo mkdir -p /mnt/nfstest && sudo mount -v 10.0.2.250:/images /mnt/nfstest
                          sudo ls -al /mnt/nfstest
                          sudo umount /mnt/nfstest[/CODE]

                          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
                          • H
                            haste347
                            last edited by

                            Below are the results of the commands.

                            root@VEI-3000D:/home/administrator# sudo mkdir -p /mnt/nfstest && sudo mount -v 10.0.2.250:/images /mnt/nfstest
                            mount: no type was given - I’ll assume nfs because of the colon
                            mount.nfs: timeout set for Thu Mar 5 08:41:21 2015
                            mount.nfs: trying text-based options ‘vers=4,addr=10.0.2.250,clientaddr=10.0.2.153’

                            root@VEI-3000D:/home/administrator# sudo ls -al /mnt/nfstest
                            total 12
                            drwxrwxrwx 22 root root 4096 Feb 27 09:45 .
                            drwxr-xr-x 3 root root 4096 Mar 5 08:37 …
                            drwxrwxrwx 2 root root 4096 Feb 19 16:54 dev

                            root@VEI-3000D:/home/administrator# sudo umount /mnt/nfstest
                            root@VEI-3000D:/home/administrator#

                            Oddly enough, I have done some testing and I am able to capture images via FOG. However, I receive the ‘permissions denied’ error any time I try to deploy an image using various workstations and images. Any ideas on why this is happening?

                            Thanks again!

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

                              Seems like there are no images being saved when you upload them. Maybe the are not moved. When you upload an image it’s first saved to /images/dev/<image-name> and moved to /images/<image-name> when it’s finished. Please run this command on the server ‘ls -alR /images’ and post the output.

                              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
                              • H
                                haste347
                                last edited by

                                Hmm, I seem to have some issue with getting the info posted. I cannot attach the plain text file, and when I try to post as I have been posting, it says it is spam. 😕

                                Here is the output of what I am able to get by the spam filter. It basically continues down listing each of the images similar to the “VEIGoldenImage” and “VEIUbuntu1404x647010” files below.

                                @VEI-FOG:~# ls -alR /images
                                /images:
                                total 92
                                drwxrwxrwx 23 root root 4096 Mar 5 11:07 .
                                drwxr-xr-x 25 root root 4096 Feb 10 11:04 …
                                drwxrwxrwx 2 root root 4096 Mar 5 11:07 dev
                                -rwxrwxrwx 1 root root 0 Feb 25 16:36 .mntcheck
                                drwxrwxrwx 2 root root 4096 Feb 10 11:04 postdownloadscripts
                                drwxrwxrwx 2 root root 4096 Feb 19 15:25 PRC04
                                drwxrwxrwx 2 root root 4096 Feb 18 17:08 VEIGoldenImage
                                drwxrwxrwx 2 root root 4096 Mar 5 10:38 VEIUbuntu1404x647010
                                drwxrwxrwx 2 root root 4096 Feb 12 14:21 VEIWin75520Laptop
                                drwxrwxrwx 2 root root 4096 Feb 11 14:41 Win76430
                                drwxrwxrwx 2 root root 4096 Feb 12 14:08 Win7Accounting
                                drwxrwxrwx 2 root root 4096 Feb 16 16:47 Win7Acer4620Laptop
                                drwxrwxrwx 2 root root 4096 Feb 13 11:20 Win7BaseImage
                                drwxrwxrwx 2 root root 4096 Feb 13 12:07 Win7CivilDesigner
                                drwxrwxrwx 2 root root 4096 Feb 12 15:32 Win7CivilEngineer
                                drwxrwxrwx 2 root root 4096 Feb 16 17:09 Win7CostControls
                                drwxrwxrwx 2 root root 4096 Feb 12 15:38 Win7IEwCAD
                                drwxrwxrwx 2 root root 4096 Feb 12 15:28 Win7InstrumentElectrical
                                drwxrwxrwx 2 root root 4096 Feb 16 14:12 Win7Mechanical
                                drwxrwxrwx 2 root root 4096 Feb 18 15:10 Win7PipingwCAD
                                drwxrwxrwx 2 root root 4096 Feb 12 15:25 Win7Process
                                drwxrwxrwx 2 root root 4096 Feb 12 15:49 Win7ProjectControls
                                drwxrwxrwx 2 root root 4096 Mar 5 10:55 Win7TestImage
                                drwxrwxrwx 2 root root 4096 Feb 19 09:06 Win7ZboxAcer

                                /images/dev:
                                total 8
                                drwxrwxrwx 2 root root 4096 Mar 5 11:07 .
                                drwxrwxrwx 23 root root 4096 Mar 5 11:07 …
                                -rwxrwxrwx 1 root root 0 Feb 25 16:38 .mntcheck

                                /images/postdownloadscripts:
                                total 12
                                drwxrwxrwx 2 root root 4096 Feb 10 11:04 .
                                drwxrwxrwx 23 root root 4096 Mar 5 11:07 …
                                -rwxrwxrwx 1 root root 233 Feb 10 11:04 fog.postdownload

                                /images/PRC04:
                                total 56336000
                                drwxrwxrwx 2 root root 4096 Feb 19 15:25 .
                                drwxrwxrwx 23 root root 4096 Mar 5 11:07 …
                                -rwxrwxrwx 1 root root 512 Feb 19 15:24 d1.mbr
                                -rwxrwxrwx 1 root root 78557 Feb 19 15:24 d1p1.img
                                -rwxrwxrwx 1 root root 192215879 Feb 19 15:25 d1p2.img
                                -rwxrwxrwx 1 root root 57495742045 Feb 19 16:54 d1p3.img

                                /images/VEIGoldenImage:
                                total 12590772
                                drwxrwxrwx 2 root root 4096 Feb 18 17:08 .
                                drwxrwxrwx 23 root root 4096 Mar 5 11:07 …
                                -rwxrwxrwx 1 root root 1 Feb 18 16:55 d1.fixed_size_partitions
                                -rwxrwxrwx 1 root root 0 Feb 18 16:58 d1.has_grub
                                -rwxrwxrwx 1 root root 1048576 Feb 18 16:58 d1.mbr
                                -rwxrwxrwx 1 root root 259 Feb 18 16:58 d1.minimum.partitions
                                -rwxrwxrwx 1 root root 15 Feb 18 16:55 d1.original.fstypes
                                -rwxrwxrwx 1 root root 259 Feb 18 16:55 d1.original.partitions
                                -rwxrwxrwx 1 root root 0 Feb 18 16:55 d1.original.swapuuids
                                -rwxrwxrwx 1 root root 8141788569 Feb 18 17:08 d1p1.img
                                -rwxrwxrwx 1 root root 4750076687 Feb 18 16:31 VEIGoldenImage

                                /images/VEIUbuntu1404x647010:
                                total 1788480
                                drwxrwxrwx 2 root root 4096 Mar 5 10:38 .
                                drwxrwxrwx 23 root root 4096 Mar 5 11:07 …
                                -rwxrwxrwx 1 root root 4 Mar 5 10:34 d1.fixed_size_partitions
                                -rwxrwxrwx 1 root root 0 Mar 5 10:34 d1.has_grub
                                -rwxrwxrwx 1 root root 1048576 Mar 5 10:34 d1.mbr
                                -rwxrwxrwx 1 root root 310 Mar 5 10:34 d1.minimum.partitions
                                -rwxrwxrwx 1 root root 48 Mar 5 10:34 d1.original.fstypes
                                -rwxrwxrwx 1 root root 310 Mar 5 10:34 d1.original.partitions
                                -rwxrwxrwx 1 root root 47 Mar 5 10:38 d1.original.swapuuids
                                -rwxrwxrwx 1 root root 1830317087 Mar 5 10:38 d1p1.img
                                -rwxrwxrwx 1 root root 551 Mar 5 10:38 d1p2.img

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

                                  Looks pretty good! I just don’t understand why you don’t see this when connecting with NFS…

                                  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
                                  • H
                                    haste347
                                    last edited by

                                    It is a head scratcher, for sure! Do you think a re-install is in order at this point?

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

                                      Hmmmm. I personally don’t like reinstalling just for gods sake. Might fix it but you’ll never know why… If that’s ok with you give it a go!

                                      But before that please check your /etc/exports again. I am very sorry to say this but I checked the code from your very fist post character by character just now. Yours looks like this (is that correct???):
                                      [CODE]/images *(ro_sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                                      /images/dev *(rw,sync,no_wdelay,no_root_squash,insecure)[/CODE]

                                      But on my system it looks like this:
                                      [CODE]/images *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure,fsid=1)
                                      /images/dev *(rw,sync,no_wdelay,no_root_squash,insecure,fsid=2)[/CODE]

                                      See the differences?? ‘ro_sync’ should definitely be ‘ro,sync’ and I guess those ‘fsid’ parameters at the end are there for a reason too!

                                      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
                                      • Tom ElliottT
                                        Tom Elliott
                                        last edited by

                                        The fsid isn’t always needed, but some OS’s require it as a “priority” ordering of sorts. It doesn’t hurt TO have them, but it also doesn’t hurt to not have them.

                                        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
                                        • H
                                          haste347
                                          last edited by

                                          Ahh, my fault, sorry, I was typing with my head over my shoulders. Here is an actual copy/paste of the etc/exports

                                          /images *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                                          /images/dev *(rw,sync,no_wdelay,no_root_squash,insecure)

                                          I too, don’t like re-installing as we never find out the cause. However, another install would help my experience doing so, and doing a fresh setup knowing I will need to use dnsmasq would be good for me as well.

                                          I’ve got a back-up of all the created images anway, which makes it even less of a hassle.

                                          I certainly appreciate all of the awesome help you’ve provided!

                                          I will update after I get the install complete.

                                          1 Reply Last reply Reply Quote 0
                                          • H
                                            haste347
                                            last edited by

                                            I have finished the re-install and so far so good! I am both capturing and deploying images, even the laptop I initially noticed the problem with is taking the restored-from-back-up image.

                                            I am currently restoring the rest of the images and will test more tomorrow. I will even restart the FOG server and hope this doesn’t happen again! Haha!

                                            At this time, I think all of the ‘fixes’ for me trying to get the original TFTP timeout issue resolved (before I tried dnsmasq) may be the cause for this. With my inexperience with Linux I was trying what worked for others without actually knowing what I was changing.

                                            The only issue I seem to have now is after I installed dnsmasq, I can no longer browse the internet. It’s a dns issue, for sure, as I can ping IPs, just not names. This also was happening before I re-installed. I’ll work that issue out with the dnsmasq peeps.

                                            I will update after the re-start!

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

                                            152

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project