@sebastian-roth
Auto update via fog-gui works on FOG-Pi server (raspbian) that has direct internet access.
Production fog server does not work even after making sure directory permissions are set. bzImage created by zero bytes.
The create directory failed when executing on production server. The backup directory already existed. Peeking inside it has content.
reviewing the apache error log netted this info.
[Sat Feb 03 08:28:25.466950 2018] [:error] [pid 21617:tid 139862824957696] [client 10.96.151.50:62795] PHP Warning: ftp_mkdir(): Create directory operation failed. in /var/www/html/fog/lib/fog/fogftp.class.php on line 492, referer: http://192.168.1.53/fog/management/index.php?node=about&sub=kernel&file=aHR0cHM6Ly9mb2dwcm9qZWN0Lm9yZy9rZXJuZWxzL0tlcm5lbC5Ub21FbGxpb3R0LjQuMTMuNC42NA==&arch=64
[Sat Feb 03 08:28:25.475420 2018] [:error] [pid 21617:tid 139862824957696] [client 10.96.151.50:62795] PHP Warning: ftp_rename(): RNFR command failed. in /var/www/html/fog/lib/fog/fogftp.class.php on line 769, referer: http://192.168.1.53/fog/management/index.php?node=about&sub=kernel&file=aHR0cHM6Ly9mb2dwcm9qZWN0Lm9yZy9rZXJuZWxzL0tlcm5lbC5Ub21FbGxpb3R0LjQuMTMuNC42NA==&arch=64
The backup directory now contains
-rwxr-xr-x 1 fog fog 0 Feb 3 08:10 bzImage_20180203_082824
The ipxe directory now contains
-rwxr-xr-x 1 fog fog 0 Feb 3 08:28 bzImage
Now may issue may be that the production fog server doesn’t have direct internet access but must pass through a proxy server.
Observations executing the script.
- Of course kernel updates on raspbian.
- On raspbian the ower of the file is fog:www-data not fog:apache that may cause problems for others executing the script based on the FOG server’s OS.
- On raspbian /var/www/fog/service/ipxe is correct on centos the correct path is /var/www/html/fog/service/ipxe.
- With corrections the script executed correctly on both raspbian and centos.