FOG not saving images in the directory
-
I have multiple images on our FOG server, and all of them can be deployed with success.
However, I’m trying to create new images, and every time I capture them, a text file with the name of the supposed directory is created on /images, but the image files are not there.
There’s enough disk space and there’s no error during capture. Using Ubuntu 18.04.5.
Any idea of what could it be? Thank you! -
@davidgoncalves If you look in /images/dev directory do you see sub directories there that appear to be mac addresses? These should be consistent with mac address of the source computer. Under normal conditions there should not be any of these directories in the /images/dev folder unless there is an active capture going on.
-
@davidgoncalves Also please run the following commands on your FOG server shell and post output here:
mount df -h ls -al /images/dev
-
@george1421 sorry for bringing back this old topic, but I am running into this same issue. But I am on Ubuntu 24.04 and FOG 1.5.10
When I run a capture task it completes successfully, but its not moving the files to /images. There is an empty locked document in /images with the name of the image. In the /images/dev there is a folder with the mac address of the client I captured from.
I’ve tried running the following commands to fix the permissions:
sudo chown -R fogproject:root /images sudo chmod -R 777 /images```
then ran the capture again, but had the same result.
Any idea on how to fix this? -
@BrightPipe OK what is happening here is, the FOS engine has uploaded the image to /images/dev/<mac_address> using NFS. Then the FOS engine connects to the fog server using FTP as the fogproject user. Then it issues a mv (move) command from /images/dev/<mac_address> to /images/<image_name> directory.
So you are saying there is a directory name in /images that matches <image_name> but the files stay in /images/dev directory? If yes then it appears that the fogproject user doesn’t have rights to ‘move’ the files out of /images/dev , but it does have rights to create the directory in /images.
That gives me a clue that the fogproject user doesn’t have permissions to /images/dev/<mac_address> directory.
-
@george1421 There isn’t a directory in /images, its just an empty file. (Image is named test) It isn’t created until after the capture process is complete.
In the /images/dev it shows root is the owner and the permissions are drwxrwxr-x
-
@BrightPipe When FOS Linux captures an image it will do that as root on FOS Linux. The issue we need to see is not specifically the owner permission but the group permission. From command line if you change into /images/dev and then issues
ls -la *
what is the group ownership of that 408… directory.What actually happens here is FOS Linux connects to the FOG server over ftp as the
fogproject
user that is also a member of thefogproject
group. That file we need to move is owned by root, but hopefully the group is fogproject so the fogproject user can move the file.One way to test this permission issue is to (from the fog server cli) connect to the fog server using ftp. The user ID is fogproject and the password for fogproject is found in a hidden file /opt/fog/.fogsettings Use that to log into the fog server over ftp then issue the following commands.
cd /images/dev mv 408d5caa1a89 /images
If you have the proper permissions on that directory then the directory should move to /images.
If the permissions are messed up (as in you mapped the /images directory over to a new disk to add more space) just rerun the fog installer, that will fix the permissions on the /image and /image/dev directory.
-
@george1421 Ok.
Here is what the group ownership is showing. Looks like it is still root.
I’m getting an error that mv is an invalid command in the ftp command line client.
But I was able to rename and create directories under both /images and /images/dev so it seems like it may not be a permissions issue?I do have my /images directory on a dedicated drive, but I thought I had set it to mount as /images before I installed FOG. I can try reinstalling and run another capture task.
EDIT---- Running the installer again seems to have fixed the issue. Thanks.
-
@BrightPipe said in FOG not saving images in the directory:
EDIT---- Running the installer again seems to have fixed the issue. Thanks.
Good deal because that was going to me my next request. I’m glad you have it sorted out.