FortiClient
FortiClient proactively defends against advanced attacks. Its tight integration with the Security Fabric enables policy-based automation to contain threats and control outbreaks. FortiClient is compatible with Fabric-Ready partners to further strengthen enterprises’ security posture.
bksol92
Staff
Staff
Article Id 419046
Description This article describes how to resolve FortiClient EMS upgrade failure due to the error 'getcwd() failed: No such file or directory'.
Scope FortiClient EMS v7.4.
Solution

When upgrading FortiClient EMS in version 7.4, the following error may be encountered:

 

Unpacking forticlientems (7.4.4.2034) over (7.4.3.1926) ...
dpkg-deb: error: failed to read archive '/opt/forticlientems/forticlientems_7.4.4.2034.F_amd64.deb': No such file or directory
dpkg: error processing archive /opt/forticlientems/forticlientems_7.4.4.2034.F_a md64.deb (--unpack):
dpkg-deb --fsys-tarfile subprocess returned error exit status 2
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory

 

getcwd() retrieves the absolute path of the current working directory from where the upgrade executable was run: getcwd(3) - Linux manual page.

 

In this case, the upgrade executable was run from /opt/forticlientems:

 

root@hostname:/opt/forticlientems# ./forticlientems_7.4.4.2034.F.amd64.bin - - --allowed_hosts '*' --enable_remote_https
Verifying archive integrity... 100% MD5 checksums are OK. All good.
Uncompressing Forticlient EMS installation package 7.4.4.2034.F 100%

 

This conflicts with the upgrade operation, as the archiving and restoration of the /opt/forticlientems directory will be performed during the process.

 

Running the upgrade executable from any directory other than /opt/forticlientems and /tmp should resolve this issue.