Termux-app: error retrieving current directory via rsync

Created on 24 Nov 2016  路  2Comments  路  Source: termux/termux-app

Usecase: Trying to rsync some files over from desktop to phone via rsync over a Bluetooth PAN SSH connexion.

When I try
rsync --progress phone-bluetooth:/any-folder .
I get the following error:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
SSH into the device manually works though.

It seems that rsync cannot find the working directory while connecting, while pwd works fine in an interactive terminal over SSH. Tried to expand my SSH config alias into a verbose rsync command, does the same: rsync -rvz -e 'ssh -p 8022' --progress [email protected]:/some-folder ~/some/local/folder/ returns
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied

Most helpful comment

Ok, this was actually an issue with the bash shell! It has been fixed in version 4.4.5-1 of the bash package, update with:

apt update && apt upgrade

Also, note that the -z compress option is not supported, you need the newer (soon to be made by default by rsync) -zz option (as long as you're client is at least version 3.1.1, otherwise you must skip rsync compression until upgrading).

All 2 comments

Hm, perhaps this is caused by parent directories not being accessible (/data/, which the Termux folders are under, are not accessible).

If we find out where the error happens we could patch around it, hopefully.

Ok, this was actually an issue with the bash shell! It has been fixed in version 4.4.5-1 of the bash package, update with:

apt update && apt upgrade

Also, note that the -z compress option is not supported, you need the newer (soon to be made by default by rsync) -zz option (as long as you're client is at least version 3.1.1, otherwise you must skip rsync compression until upgrading).

Was this page helpful?
0 / 5 - 0 ratings