Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to restore initial working directory #37

Open
zeeshanali1993 opened this issue Feb 28, 2022 · 2 comments
Open

Failed to restore initial working directory #37

zeeshanali1993 opened this issue Feb 28, 2022 · 2 comments

Comments

@zeeshanali1993
Copy link

Unable to execute this on my Thinkpad T460s

sudo validity-sensors-tools.initializer                                                                                     ✔ 
[sudo] password for user: 
Found device <DEVICE ID 138a:0090 on Bus 001 Address 004>
Downloading https://download.lenovo.com/pccbbs/mobiles/n1cgn08w.exe to extract 6_07f_Lenovo.xpfwext
Extracting "Synaptics Metallica MOH Touch Fingerprint Reader Driver" - setup data version 5.5.7
 - "app/WBF_Drivers/6_07f_Lenovo.xpfwext"
Done.
find: Failed to restore initial working directory: /home/user: Permission denied
Traceback (most recent call last):
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 329, in <module>
    fwpath = vfs_tools.download_and_extract_fw(fwdir,
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 163, in download_and_extract_fw
    fwpath = subprocess.check_output([
  File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['find', '/tmp/tmpxujopoha', '-name', '6_07f_Lenovo.xpfwext']' returned non-zero exit status 1.
@jprikner
Copy link

jprikner commented Apr 4, 2022

You need to change your current working directory to /tmp before you execute the initializer command, then it should work. Apparently, despite running the command with sudo, find executes itself as some other user and expects to be run inside the /tmp directory, otherwise will fail due to the permission issue.

@JPapir
Copy link

JPapir commented Nov 2, 2022

Thanks, I had the same problem, and this indeed helped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants