Failed to open stream

  • Server
    • FOG Version: 1.3.5
    • OS: Ubuntu 14.04 LTS
    • Service Version:
    • OS:

    I have recently installed FOG and have it set up that the images are stored on an external drive.
    My hosts boot to FOG and the capture proceeds to 100% but then fails when tries to write to the drive with the following error:

    0_1493234761107_error small.JPG

    I assume it has to do with permissions, but being new to this not sure exactly what to do with it.

  • Moderator

    @isaac Thank you for adding clarity to how you fixed it. You have a unique setup and I’m sure someone want to do the same thing in the future. Your guidance in this thread will surely help someone else.

    Marking as solved.

  • @george1421
    I didn’t rerun the installer. I tried to write with the fog user to where the images were stored and could not for some reason. Even though I had used chown and chmod with sudo. I made fog a sudoer which I know is bad practice and then reran the commands and it worked. It seems just flukey to me.

  • Moderator

    @isaac Did rerunning the installer fix the issue or were you able to fix it by your own hands?

  • @george1421
    It worked! Captured Successfully.
    It ended up being the permissions to the external drive, your post paved the way.

  • Moderator

    @isaac OK we are almost done with the checks.

    On that web page. Down at the bottom. There is a user ID and a password. If you click on the little eye you can see what the password is and copy it out.

    I want you to do this next part from a windows computer.
    User FTP and connect to your fog server using the user account on the web page and password.

    once you get logged in then do a cd /media/fossie/FOG/images if you have a small file in the current directory on your windows server you can test the right permissions to …/images with put something.txt If it uploads the file then that completes this part of the test.

    Lastly inspect the contents of the fog configuration file in /opt/fog/.fogsettings

    Make sure the user ID there and password matches the web interface also make sure the storage path matches the one where your files will be on the external drive.

    If everything looks good run through the FOG installer one more time. The installer will correct any remaining settings that are not in line.

    But from what I see your setup should be working. There is more testing we can do, but lets see if this gets you back on track.

  • @george1421
    That is odd, it was in the dev folder but not in images. I created it. 0_1493398171834_Edit: External drive - Storage Management - FOG - Open Source Computer Cloning Solution - Mozilla Firefox_005.png

  • Moderator

    @isaac Excellent!

    first thing I noticed is that the hidden file .mntcheck is missing from …/images I’ll also assume its missing from …/images/dev. You can fix by:

    touch /media/fossie/FOG/images/.mntcheck
    touch /media/fossie/FOG/images/dev/.mntcheck

    Your nfs shares appear to be configured correctly setup.

    The next thing I need a screen shot of is how your storage is configured for this fog server. It will be accessed by the web management gui.

  • Moderator

    @isaac Sorry I should have asked for one level deeper on the file structure.

    ls -la /media/fossie/FOG/images

  • Moderator

    @george1421 said in Failed to open stream:

    @isaac The showmount command will tell me more. I see what you are doing so far and we could make this work.

    as well as the output of ls -la /media/fossie/FOG that will show the structure of the images directory

    How about this info

    edit: I did see in your post, but I need the whole command showmount -e

  • @george1421
    I did what Tom Elliott suggested to no avail, coming up with the same error after capture.

    Besides the images folder is there any other place that needs fog permissions?

  • Senior Developer

    Maybe I’m under thinking here, but is /media/fossie/FOG/images owned by the fog server’s FOG user?

    It almost looks like it’s not and because of this it’s not allowed to move the data (hence the Permission Denied).

    So maybe you can start with:

    chown -R fog:root /media/fossie/FOG/images
    chmod -R 777 /media/fossie/FOG/images

  • @george1421
    Okay I will be back tomorrow, thank you!!

  • Moderator

    @isaac The showmount command will tell me more. I see what you are doing so far and we could make this work.

    as well as the output of ls -la /media/fossie/FOG that will show the structure of the images directory

  • @george1421
    Better quality in a minute. I am taking photos, because my host is offline right now.

  • Moderator

    @isaac said in Failed to open stream:

    Virtual Box and any USB automatically gets picked up when plugged in

    Ah more bits of the puzzle are divulged.

    Then lets start with the df -h command and then showmount -e and finally lsblk

    If you use putty to connect to your fog server you can copy and paste pretty easy. Or use a screen snipping tool to grab a picture of the console since you are using VB,

    You have an interesting FOG server setup. I want to see if all of the bits are in place for this to work.

  • @george1421
    Not sure what exactly you mean, I am using Virtual Box and any USB automatically gets picked up when plugged in.

  • Moderator

    @isaac How is that connected to your VM?

    From your fog server linux console can you post the results of this command df -h

  • @george1421
    It is just a 2TB USB drive with lots of space for storing images. Formatted Ext4 and mounted. Completely empty.

Log in to reply