-
Notifications
You must be signed in to change notification settings - Fork 41
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
chdir: error retrieving current directory: getcwd: cannot access parent directories #36
Comments
@arozehnal The reason is that the last command in the command sequence, |
OK, the command sequence, that seems like a reasonable explanation at first glance First... whichever of the two I run: the result is still the same: and the file is still not created second) the cause is probably hidden behind the source of the message ======================== Debug message: My default shell is 'ksh' can't too be causing the problem? |
I tried both variants of the chained commands by changing my ksh to bash before running gossh on the source, respectively I set bash as default to both logins roze and roze2 on the target server. The result is still the same though. :-( =================== simple test chained commands bash-5.1$ ls a aa; echo $? bash-5.1$ cat a|wc -l; echo $? bash-5.1$ cat aa|wc -l; echo $? set -o pipefail; cat aa|wc -l; echo $? and the worst news at the end... |
Sorry, I can't reproduce the issue you are encountering. I don't have an AIX environment, but I set up a ksh environment on my virtual machine(CentOS7.9) as remote host and mocked the users(using ksh) and actions as yours, then executed the command like For you saying 'AIX ksh does not support |
I'm not surprised by the different behaviour of AIX ksh from other shells, I've been living with it for 20 years :-(. I really like gossh and would like to use them, I understand that it's hard to give support for what I don't have access to. I run gossh from the home directory of roze2 (/home/roze2), on the target and I want to create a file in /tmp on the target..
It is not clear from the gossh debug module. So far I have tried changing the default shell for both roze and roze2 on the target to bash but the result is still the same. |
Please list results of the followings commands on target server:
In addition, login the target server with 'roze', then execute |
I have only good news :-)
I just don't know what caused the problems so far. When trying to change the default shell, I did the straightforward thing of canceling the roze2 login and then setting it up with a regular AIX routine. So probably something wrong when creating the user (?). Thank you very much for your patience and willingness to help. One last question (I promise this is the last question for this week :-) :-)) |
@arozehnal If you do not use the |
I have two logins roze and roze2.
On target host (kom) sudoers with such entry.
roze,roze2 ALL=(ALL) NOPASSWD: ALL
I can run right on target host simple:
/tmp: sudo -u roze touch b2
ls -l b2
-rw-r----- 1 roze xxx 0 2 bře 23:23 b # OK
but when I run
gossh command kom -U roze -s -e "cd /tmp; touch /tmp/pokus " -v -p ....
[DEBUG] 2024-03-02 23:39:56.182174 kom: execute command 'sudo -u roze -H bash -c ' cd /tmp; touch /tmp/pokus'' success, output: shell-init: chyba při zjišťování současného adresáře: getcwd: rodičovské adresáře nejsou přístupné: Přístupová práva souboru neumožňují provádět zadanou činnost.
chdir: error retrieving current directory: getcwd: cannot access parent directories: The file access permissions do not allow the specified action.
kom 2024-03-02 23:39:56.182553 | SUCCESS >>
shell-init: chyba při zjišťování současného adresáře: getcwd: rodičovské adresáře nejsou přístupné: Přístupová práva souboru neumožňují provádět zadanou činnost.
chdir: error retrieving current directory: getcwd: cannot access parent directories: The file access permissions do not allow the specified action.
[INFO] 2024-03-02 23:39:56.182597 success count: 1, failed count: 0, elapsed: 0.43s
/tmp/pokus was not created
how is it possible that failed count is 0 ??
================
AIX 7.2
gossh version
gitVersion: 92e3206
gitCommit: 92e3206
gitTreeState: clean
buildDate: 2024-02-25T11:23:47Z
goVersion: go1.20.2
compiler: gc
platform: aix/ppc64
The text was updated successfully, but these errors were encountered: