Opened 5 years ago
Closed 2 years ago
#13852 closed defect (moved_to_github)
bash problem with scp
Reported by: | anonymous | Owned by: | developers |
---|---|---|---|
Priority: | normal | Milestone: | Chaos Calmer 15.05 |
Component: | base system | Version: | 10.03.1 |
Keywords: | Cc: |
Description
If I changed root's shell to bash I got the following error If I want to connect with scp to the openwrt.
scp root@192.168.1.1:/tmp/test . root@192.168.1.1's password: shell-init: error retrieving current directory: getcwd: cannot access parent directories: Inappropriate ioctl for device
Attachments (0)
Change History (6)
comment:1 follow-up: ↓ 2 Changed 4 years ago by anonymous
comment:2 in reply to: ↑ 1 Changed 4 years ago by anonymous
Replying to anonymous:
Same. Bash 3.2.0(1), Dropbear 0.51-2 (remote), OpenSSH 6.0p1 (local). "/bin/ash" in /etc/passwd changed to "/bin/bash"
Same in my BARRIER BREAKER (Bleeding Edge, r37864), but just when executing sudo -s. I created an unprivileged user and changed both entries in /etc/passwd to have /bin/bash as login shell.
Whenever I execute sudo -s from /home or /home/my_unprivileged_user I get:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Success
Both directories have 766 as access rights. If I execute sudo -s from any other location, no error message is printed.
I suspect that this could be a getcwd() issue as described in this thread:
http://comments.gmane.org/gmane.os.cygwin/141549
and especially in this post:
comment:3 Changed 4 years ago by anonymous
I forgot to mention that my bash version is GNU bash, version 4.2.28(1)-release (mips-openwrt-linux-gnu). However the issue can be easily solved executing:
sudo -s -E
-E preserves the environment of the sudo-ing user.
comment:4 Changed 4 years ago by jow
- Milestone changed from Backfire 10.03.2 to Chaos Calmer (trunk)
Milestone Backfire 10.03.2 deleted
comment:5 Changed 2 years ago by hmg007
2 years later, GNU bash, version 4.2.53(1)-release (mips-openwrt-linux-gnu) and the problem persists. Here's my workaround for scp and rsync. (I don't use sudo.)
/etc/passwd:
henryg:x:1000:1000::/home/henryg:/bin/ash
cat $HOME/.profile
# .profile - Bourne shell login script [ "$PS1" = "" ] || { /bin/bash exit }
No distracting messages.
comment:6 Changed 2 years ago by nbd
- Resolution set to moved_to_github
- Status changed from new to closed
bash is maintained here: https://github.com/openwrt/packages
Same. Bash 3.2.0(1), Dropbear 0.51-2 (remote), OpenSSH 6.0p1 (local). "/bin/ash" in /etc/passwd changed to "/bin/bash"