Nas node storage : permission denied



  • Hello,

    I want to store my images on a NAS qnap. So I followed this tutorial: https://forums.fogproject.org/topic/10973/add-a-nas-qnap-ts-231-as-a-storage-node-fog-v1-4

    But that does not work, I always have an error message when creating the image.
    "Args passed
    Reseaon mount: mountin 192.168.33.38:/share/Images/dev as / images: permission denied "

    Fog replicator returns that :

    ![alt text](478ecd3f-617d-4da8-8a92-c24c51c72dd5-image.png image url)

    Thanks !


  • Moderator

    @lucas942 I don’t know qnap, but for synology the settings are such: https://forums.fogproject.org/post/91425

    NFS Permission (tab)
    Create new Permission
    Hostname or IP: *
    Privilege: Read/Write
    Squash: No mapping
    Security: sys
    Checked Enable asynchronous
    Checked Allow users to access mounted subfolders
    

    The Squash==no mapping or Security==sys was the key. I don’t remember which was the actual fix.

    If you can not get it we can test to make sure this IS your issue. Just schedule a capture or deploy but tick the check box for debug before you schedule the task. PXE boot the target computer. After pressing the enter key a few times you should be dropped to the FOS linux command prompt. Once you are at that point I will tell you the next commands you will need.


  • Moderator

    @lucas942 said in Nas node storage : permission denied:

    I just got to find a directory in / images on the NAS 14gb its name is: e86a64cbxxxx and this corresponds to the MAC address of my PC.
    So I rename this folder “Standard”?
    Because the name of my image is “Standard”

    You have a few things that are wrong.

    1. The image file should be first captured into the /images/dev/<mac_address> folder.
    2. After the image is fully uploaded to the /images/dev/<mac_address> folder the target computer logs into the FOG server (nas in your case) via FTP and issues a move command to move all of the files in /images/dev/<mac_address> to /images/<image_name>.

    The screen shot of the error you see about ftp_put tells me that in the storage node configuration there is 2 fields Management Username and Management Password. The values in those fields must match the user you created on the NAS device.



  • @Sebastian-Roth

    Thanks for your answer !

    760e0d2d-27e1-4561-b14d-19181ec7d66d-image.png



  • @lucas942 @Sebastian-Roth @george1421

    I just got to find a directory in / images on the NAS 14gb its name is: e86a64cbxxxx and this corresponds to the MAC address of my PC.

    So I rename this folder “Standard”?
    Because the name of my image is “Standard”

    Ib447463a-5067-4db3-a8d7-6c162d6bbb4f-image.png

    I renamed the file, but
    when capturing the image, a new folder with the MAC address of the PC is created.
    Also, the storage location is set to / images / dev but the image is created in / images.

    I get a new error after this change and my “Standard” folder has been removed, but it remains the folder with the e86xxxxxxxx mac address:

    20190513_094440.jpg



  • This post is deleted!

  • Developer

    @lucas942 When you see the “Error returned: Invalid Storage Group”, can you please connect to the database on your FOG server and run the following query:

    shell> mysql -u root -p
    Password:
    ...
    mysql> use fog;
    ...
    mysql> SELECT taskID,taskName,taskCreateTime,taskHostID,taskNFSGroupID FROM tasks ORDER BY taskID DESC LIMIT 5;
    ...
    

    Take a picture or copy&paste the whole output here.


  • Moderator

    @lucas942 Sorry I need to see what is on your nas since you are uploading to your nas right?

    cheers until next week.



  • @george1421
    On my fog server in /images/dev i have that :

    ![alt text](cbed23dc-b3dc-4272-a72a-6221f4aa9905-image.png image url)

    (I need to go, i come back later sorry and thanks a lot for your help !!!)


  • Moderator

    @lucas942 We have just recently seen this invalid storage group error message. The last time the OP of that thread just rebuild the FOG server to fix and never worked to find the solution. I personally think the update database is a bit more telling and actually both error are incorrectly reporting the real issue.

    I want you to look on your nas box. In the equivalent to /images/dev on the fog server. Check to see if a directory is there with the mac address of the target computer as the directory name. If it is, this is the point in the upload process where the fog client connects back to the storage device via FTP and renames the /images/dev/<mac_address> directory to /images/<image_name>. I think this is where its currently falling down.



  • @george1421

    So I’m coming to the end “image captured, successfully”.

    alt text

    But immediately after I have this message:

    alt text

    Do you want me to create a new thread for this problem?



  • Solution

    5018cb1f-6cfd-4455-828f-5c74e5051e02-image.png

    45e86042-fc5d-4a9f-8937-b2f4af72130d-image.png

    You have to have exactly this configuration for tftpboot, images and snapins.

    you have to put IP = * and not IP = X.X.X.X, it’s my error



  • @george1421 Thanks ! That was it ! The image is being created, I will see if it works.

    I had set NFS for the fog server instead of “hostname or IP = *”.

    I will do a post with my solution, thanks.

    But to priory the image is downloading well in the NAS.

    It was 2 days that I block. 😀

    I come back to you if I have another problem. 😀

    (sorry for my english, i’m french 😉 )


  • Moderator

    At the fos linux command prompt you will need to key in:

    mkdir /images
    mount 192.168.1.1:/images/dev /images 
    

    Replace 192.168.1.1 with the actual IP address of your nas box.


  • Moderator

    @lucas942 I don’t know qnap, but for synology the settings are such: https://forums.fogproject.org/post/91425

    NFS Permission (tab)
    Create new Permission
    Hostname or IP: *
    Privilege: Read/Write
    Squash: No mapping
    Security: sys
    Checked Enable asynchronous
    Checked Allow users to access mounted subfolders
    

    The Squash==no mapping or Security==sys was the key. I don’t remember which was the actual fix.

    If you can not get it we can test to make sure this IS your issue. Just schedule a capture or deploy but tick the check box for debug before you schedule the task. PXE boot the target computer. After pressing the enter key a few times you should be dropped to the FOS linux command prompt. Once you are at that point I will tell you the next commands you will need.



  • @george1421 ok, on my NAS everything seems ok, I have a user fog with all rights.
    How to allow root to mount a share?

    I do not find, as you said, an option for that.

    Thanks 😀


  • Moderator

    @lucas942 Before you downgrade FOG, I would first get your permission issue fixed. If you don’t fix it you will have the same issue with FOG 1.4.4.



  • @george1421
    Merci pour votre réponse !

    1. ah daccord, mais j’ai pourtant vu que cela reste possible ?
    2. Je vais downgrader la version de Fog alors.
      4)Je doit donc créer sur ma VM/serveur fog, un utilisateur ayant accès par ftp au NAS ?

    It is not possible on the qnap to activate this sharing?

    Yes I want, any solution is welcome!

    Thank you so much !


  • Moderator

    There are a couple of things here.

    1. The FOG Project developers don’t support this type of configuration. They only support FOG based storage nodes.
    2. Certain changes in the 1.5.x stream may make using a NAS device a bit more difficult.
    3. The FOG image replicator will only replicate from a FOG server to a remote storage node. It has no real impact on image capture.
    4. To replicate between a FOG master node an a remote storage node the ftp protocol is used. Your storage node will need a user setup that has full access to the storage node location on your remote device.

    mountin 192.168.33.38:/share/Images/dev as / images: permission denied

    If I had to guess, I’m going to say that root isn’t allowed to mount that share on your nas device. The FOS client runs as root on the FOS linux OS. By default the user root is probably blocked from mounting that share on your nas. At least on the synology’s there is a check box to allow this type of mount.

    We can debug this more if you want.



  • 38319f42-114e-4196-acf6-2e2d3ca07d1b-image.png

    Nano .fogsetting

    2c3ff2bd-bcb2-4894-821b-a033500eb65f-image.png



325
Online

6.5k
Users

13.9k
Topics

131.3k
Posts