Skip to main content
bksol92
Staff
Staff
November 14, 2025

Technical Tip: How to resolve FortiClient EMS upgrade failure due to the error 'getcwd() failed: No such file or directory'

  • November 14, 2025
  • 0 replies
  • 990 views
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.