mkdir "Operation not permitted" on ntfs mounting point through fog.postdownloadscripts
I’m launching a postdeployment script after PXE deployment, called in fog.postdownloadscript to upload Drivers from our server to the computer.
Thus, I mount my ntfs partition with : mount /dev/sda4 /mnt
Then I want to create a directory for my drivers : mkdir /mnt/Drivers
Then copy the drivers into it.
This operation works perfectly well when i’m doing it on a Debian live USB. But when I try to do it with the script with FOG, i get “cannot create directory /mnt/Drivers Operation not permitted”
When I type mount, it says :
“/dev/sda4 on /mnt type ntfs (rw,relatime,uid=0,gid=0,fmask=0177,dmask=077,nls=cp437,errors=continue,nft_zone_multiplier=1)”
So I do have write authorization, and when i type “id” it says that I’m “uid=0(root) gid=0(root) groups=0(root)” so I should be allowed to write in it !
Could you please help me solve this issue ?
I’ve seen that there are scripts for this, detailed in this topic : https://forums.fogproject.org/topic/11126/using-fog-postinstall-scripts-for-windows-driver-injection-2017-ed , but we already have the drivers on another server, with a different architecture, so I don’t want to move everything.
@sebastian-roth Thank you ! That does it perfectly. I didn’t know that command. Have a good day !
but we already have the drivers on another server, with a different architecture, so I don’t want to move everything.
What does this mean beyond the obvious. What other architecture you mean, Cortex ARM? Do you have the directory exported with the same permission structure and no squash root like the fog server? We really need a bit more details to help you properly. Sebastian has the mount command spot on, but that is only have of the equation. The NFS server also needs a few things setup correctly too.
@lcis Use the command
ntfs3g /dev/sda4 /mntinstead and it should give you proper write access to the NTFS filesystem.