cea-hpc / modules

Environment Modules: provides dynamic modification of a user's environment
http://modules.sourceforge.net/
GNU General Public License v2.0
668 stars 102 forks source link

errors thrown after 'SU' command issued from user: oracle (non-sudoers). #524

Closed jgbarto closed 4 months ago

jgbarto commented 4 months ago

Describe the bug

Command issued below: [oracle@serverID deinstall]$ su Password: xxxxxxxxxx

To Reproduce

Steps to reproduce the behavior: See above. ...


Location and content of any modulerc or modulefile involved:

```console
$ cat path/to/modulepath/module/version
$ cat path/to/modulepath/module/.modulerc
$ cat path/to/modulepath/.modulerc
...

Expected behavior

Drop into # shell for additional installation processes.

Error and debugging information

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
ERROR: error getting working directory name: no such file or directory
      while executing
  "pwd"
      (procedure "getAbsolutePath" line 9)
      invoked from within
  "getAbsolutePath $::argv0"
      (procedure "cmdModuleAutoinit" line 11)
      invoked from within
  "cmdModuleAutoinit"
      (procedure "module" line 325)
      invoked from within
  "module autoinit"
      ("eval" body line 1)
      invoked from within
  "eval $execcmdlist"
  Please report this issue at https://github.com/cea-hpc/modules/issues

### Modules version and configuration
<!-- Provide the output of the command below -->

```console
$ module --version
$ module config --dump-state

Additional context

This occured after a failed Oracle 19c install, and subsequent deinstall. Consoles were left open without activity for several days before returning to attempt re-install of Ora 19c. Attempt to switch from user oracle to root user via 'SU' command threw the errors above.

Errors returned from system that is a VM guest, OEL 8.9 (recently upgraded from OEL 7.9). Hypervisor is Ubuntu 22.04 LTS running QEMU/QEMM.

xdelaruelle commented 4 months ago

Thanks for this report. This issue is a duplicate of #457.

Issue comes from running su from a shell session where current working directory has been deleted.

The error message comes from Modules not being able to determine current working directory, but the initializing shell session also get this issue:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

457 has fixed this issue by catching the error to produce a simpler error message rather a full error stack with a request to report the error upstream. This fix is available starting Modules v5.1.1

jgbarto commented 4 months ago

Thank You, Xavier. Good to know it is not some sort of FS corruption in my system.

Best,

Sent from Proton Mail for iOS

On Wed, Feb 14, 2024 at 11:29 AM, Xavier Delaruelle @.***(mailto:On Wed, Feb 14, 2024 at 11:29 AM, Xavier Delaruelle < wrote:

Thanks for this report. This issue is a duplicate of #457.

Issue comes from running su from a shell session where current working directory has been deleted.

The error message comes from Modules not being able to determine current working directory, but the initializing shell session also get this issue:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

#457 has fixed this issue by catching the error to produce a simpler error message rather a full error stack with a request to report the error upstream.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>