FreeNas FTP error
-
The FTP Root is normally different than the NFS root on NAS and SAN devices. This is why we have two different fields for this:
Image Path
andFTP Path
. Looks like you need to adjust the FTP Path to be correct. This is also documented in the wiki already: https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_FTP#FTP_Path -
@lubo said in FreeNas FTP error:
*Reattemping to update database…
Error returned: Type: 2 File: /var/www/html/fog/lib/fog/fogftp.class.php.What should I adjust this to? It is something with the ftp:
Here is the error from fog logs.
[pid 2617] [client 192.168.88.112:34710] PHP Warning: ftp_rename(): Rename /images/Dell-Vanilla: Is a directory in /var/www/html/fog/lib/fog/fogftp.class.php on line 769
[Fri Dec 29 08:25:46.626228 2017] [:error] [pid 2617] [client 192.168.88.112:34710] PHP Warning: ftp_put(/images/dev/90b11c7ea08d): failed to open stream: No such file or directory in /var/www/html/fog/lib/fog/fogftp.class.php on line 708 -
Seems that ftp part and FreeNas are not working… But at the same time I have no trouble login with “Free” account from Windows ftp client
-
Regarding the FTP Root. As you can see in the screenshot I mapped the home directory for “Free” to \mnt\RaidZ . The path to images folder is \mnt\RaidZ\images. What also I have to change?
-
@lubo Using the FTP credentials, simply log in via actual FTP, and do an
ls
to see where you are. Wherever you ‘plop’ into, that’s your FTP root. Taking that into consideration, you need to adjust FOG’s FTP Path to start at the ftp root -> to the images directory. If that makes sense. Also, could be a simple permissions issue too. -
I restarted from scratch, but the same error persists.
I double checked and verified every single step of wiki link:
https://wiki.fogproject.org/wiki/index.php?title=Use_FOG_with_FreeNAS
See my attachments
The temp images is created on FreeNAS on /images/dev folder, but then seems like ftp cannot move this image over to /images folder.
I checked the home ftp folder and did adjust Fog settings accordingly.
I’m scratching my head and cannot think of anything else.Please help.
-
-
@lubo ![0_1514602490965_20171229_205040.jpg](Uploading 100%)
I also tried to change the home dir one level up to /mnt/RaidZ and then adjusted Fog ftp settings in Storage node to /images instead of /
Still getting an error, but now the message is for folder is /images/dev/MACADDRESS.
Interesting enough when I tried from Windows machine to upload file to folder in question it worked. .Same user account as fog ftp user
-
We do have two (three) tutorials for using a traditional NAS as a FOG storage node.
Synology
https://forums.fogproject.org/topic/9430/synology-nas-as-fog-storage-nodeQNAP
https://forums.fogproject.org/topic/10973/add-a-nas-qnap-ts-231-as-a-storage-node-fog-v1-4Windows 2012
https://forums.fogproject.org/topic/10097/setting-up-a-windows-2012-server-as-a-fog-storage-nodeThe point being you may be able to glean what is needed from those tutorials to make freenas work for you. I have not personally tried to setup a freenas image as a fog storage node, but on the surface it should be possible as long as it has NFS and FTP support.
-
@lubo Carefully read through this to understand why this happens and how to solve it: https://forums.fogproject.org/topic/9850/freenas-ftp-command-question