この記事は3年以上前に書かれた記事で内容が古い可能性があります
suできない
2016-09-11
あれ、suできない、となった時、以下の方法で回避
(rootになるとログ取られる設定になっていることは今回と関係ない)
# su yoshiisland shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied chdir: error retrieving current directory: getcwd: cannot access parent directories: Permission denied /usr/local/bin/pyenv: line 49: cd: /var/root: Permission denied shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied chdir: error retrieving current directory: getcwd: cannot access parent directories: Permission denied /usr/local/bin/pyenv: line 49: cd: /var/root: Permission denied $ cd /usr/libexec/ chdir: error retrieving current directory: getcwd: cannot access parent directories: Permission denied $ su - Password: Script started, output file is /var/root/terminal_logs/20160908.log # cd /usr/libexec/ # sudo ./locate.updatedb # su yoshiisland $