SOLVED "Permission denied": another Nas Issue (Qnap TS-231)

  • Server
    • FOG Version: 1.3.5
    • OS: Ubuntu 14.04
    • Service Version: Any
    • OS: Mostly Win 7

    Issue to connect a Qnap NAS to capture and deploy fog’s images

  • Moderator

    @iarwayn said in "Permission denied": another Nas Issue (Qnap TS-231):

    the fact that the Nas size and occupation doesn’t appear on the main menu, but, hey! that won’t ruin my joy.

    You will have to live with good enough. For those settings to be populated, you need a real fog server as the storage node. You need a few php pages to execute on the target NAS to return what FOG expects. You can probably get there if you install apache and php on the NAS and then copy over the FOG web site to the storage node. You may need a few php libraries beyond what the NAS php page supports by default. I probably can be done but the results (values on the fog homepage) may not be worth the effort.

    I’m pretty sure it could be done with a synology nas because it does have packages for apache and php 5.6 that could be installed… But I never had the motivation to try or to document it.

    BTW: Well done on the QNAP integration. If you feel motivated at some time please document your steps for the qnap in the tutorials section like I’ve done so the next guy can build upon what YOU have created. There is no problem for the French screen shots either, we are all professional that know how to use google translate 😉

  • OH YEAH! Finally I’ve been able to find some time to focus and really think over the problem and I’ve searched in the aera of the path to my Qnap volumes.
    That was the key!
    I’ve restarted the project from scratch to be neat and simply followed the recipe written by George1421 (@george1421 thank you so much for your pedagogy) using the path /share/… and not /DataVol1/… (see the pictures)0_1507122815219_Fog1.png
    Only one thing remains (but so few important), the fact that the Nas size and occupation doesn’t appear on the main menu, but, hey! that won’t ruin my joy.
    Thanks to you all for your help, I can finally (and fully) enjoy the power of FOG.
    That case is SOLVED

  • Hi everyone and sorry for the late reply,
    I came by just to thank those who helped me with my nas issue and tell to those who have the same problem that I don’t give up yet, although I have not invested the time this project needs lately.
    I will follow Chris.dees’s idea and give you news of the result but not short-term unfortunately.
    Thank you again

  • This is probably out of the scope of your issue but since I set 2 qnaps I wanted to mentioned what I did. I tried exactly what you are doing but on a synology and it was not very pretty. So I went this way with it…

    1. purchased a qnap and setup the raid array giving me about 10TB of storage. (4x4TB WD Red)
    2. setup virtualization station on the qnap and installed Ubuntu 16 as a virtual machine (giving the VM the entire raid array as it’s hard drive)
    3. from there I just launched the Ubuntu VM and installed Fog 1.40 (haven’t updated yet)
    4. once that was done I setup a second qnap nas at a second facility and repeated the above steps except I set this one up as a storage node and pointed it to the first one
    5. I setup the location plugin and I have a main location (set as master) and a secondary location both in the same storage group.

    I am able to boot to the network from anywhere and upload to the master and it replicates to the secondary. I am able to take snapshots of the VM as I go so if I break something I can load up a previous snapshot and get back to it.

    This is as far as I have gotten so far. I have working this at my job for a couple months as a side project.

  • Moderator

    @Iarwayn OK next time we wait 24 hours before answering. <just kidding>

    For me the hardest part was getting the right permissions in NFS share itself. The FOS engine is based on linux and it connects to the NFS server as root. By default most NFS servers will block root from accessing its NFS share.

    The second difficulty was with the FTP service, getting the path right. The FOS engine will clone the disk to /images/dev/<mac_address> on the FOG server. Once the image has uploaded the FOS engine uses FTP to connect to the FOG server and moves the file to /images/<image_name> so the FTP server needs access to the NFS share.

    The synology NAS instructions will most likely give you the best answer on folder design.

    Good luck to you and let us know your success. We can always use good guides for others to follow.

  • @george1421 I didn’t expect a so fast answer! Thanks o/
    I was so close from the painting that I couldn’t see the whole picture!
    Mounting a mounted share Oo’ … I’m going to test the transformation of my Qnap into a fog storage node and we’ll see.
    I’ll tell you if that works and if so, I will try to make a clear modus operandi for the Qnap!
    Merci beaucoup ^_^

  • Moderator

    just so you are clear. You can not connect your qnap to your fog server and have your files saved to the qnap device. NFS does not like to share out a mounted share. The target computer uses nfs to connect the target computer to the fog server for imaging. So you can not reshare an nfs mounted share.

    You can (maybe) turn a qnap nas into a FOG storage node and then (maybe) turn that storage node into a master node.

    I’ve done two write ups on 1) using a synology NAS as a fog storage node and 2) using a windows 2012 server as a fog storage node.

    It should be possible with the qnap as long as your qnap has the following services.

    1. NFS
    2. FTP
    3. TFTP

  • @Iarwayn said in "Permission denied": another Nas Issue (Qnap TS-231):

    • FOG Version: 1.3.5
    • OS: Ubuntu 14.04
    • Service Version: Any
    • OS: Mostly Win 7

    Issue to connect a Qnap NAS to capture and deploy fog’s images

    Hi everyone (and maybe my saviors),

    First of all, I’ll do my best to write in good english but mine is not perfect so I apologize if I make mistakes.

    I’ve installed fog 1.3.5 on a VM and I try since 3 days to use and connect my NAS Qnap TS-231 to capture/deploy images from clients of my network (
    I’ve read carefully Sunks topic ( and boeleke’s too ( and a lot of others (qnap forums also) but anyway, I must do something wrong and I don’t know why.

    First, I’ve activated the NFS service on my Qnap and properly (I think) configure it with my shared folder /fog
    And yes I’m french ^_^.
    Then I’ve created the same user/login on my NAS (with admin rights) than the Administrator of my fog server (@ch3i made me realise that the client connects himself directly to the nas)
    I’ve mounted on my Ubuntu server the appropriate folders with
    mount -o nolock,proto=tcp,rsize=32768,intr,noatime /images
    mount -o nolock,proto=tcp,rsize=32768,intr,noatime /images/dev
    To test if my solution was going well so far, I’ve copied a text file created in /images to /images/dev -> OK
    My /etc/exports file is like that
    Finally I’ve created the .mntcheck files in my /images and /images/dev/ folders with
    touch /images/.mntcheck
    touch /images/dev/.mntcheck
    My fog interface shows me that
    and it makes me happy 😄
    but when I try to capture an image from a client it shows me this
    And I cry :’(

    I don’t know where is my mistake but when I wanted to check all the permissions, to the command line:
    chmod -R 777 /images
    I got the error that I don’t have the permission to do so.

    Oh and I almost forgot, I tried to add a node in the Fog server with those parameters
    But it’s not working, I can’t even see it in the list of storage node.

    I begin to become bald by dint of scratching my skull.
    I’m the network administrator of a small school and it would be a real enhancement if that would work.

    I’m sorry for all the reading, but I want to be precise.

    thank you for your time and thank you more for helping me.