Eu tenho uma nova instância do Scientific Linux 6 (semelhante ao RHEL6 e ao CentOS6), em execução no Parallels.
O diretório inicial está em um local não padrão, que eu chamarei de / homedir
Quando eu ssh para esta caixa, recebo um erro:
laptop $ ssh 192.168.1.100
[email protected]'s password:
Could not chdir to home directory /homedir/stefanl: Permission denied
Mas logo em seguida eu posso chdir para esse diretório, sem um erro:
[stefanl@localhost /]$ cd /homedir/stefanl
[stefanl@localhost ~]$ touch foo
[stefanl@localhost ~]$ ls -la
total 28
drwx------. 3 stefanl wheel 4096 Sep 14 17:53 .
drwxr-xr-x. 5 root root 4096 Sep 14 17:16 ..
-rw-------. 1 stefanl stefanl 303 Sep 14 18:16 .bash_history
-rw-r--r--. 1 stefanl stefanl 18 May 26 08:46 .bash_logout
-rw-r--r--. 1 stefanl stefanl 176 May 26 08:46 .bash_profile
-rw-r--r--. 1 stefanl stefanl 124 May 26 08:46 .bashrc
-rw-rw-r--. 1 stefanl stefanl 0 Sep 14 17:46 foo
Além disso, como root, posso su
para minha conta e parece funcionar bem. Se eu não tiver permissão para acessar este diretório, esperaria ver um erro.
[stefanl@localhost ~]$ pwd
/data/homedir/stefanl
[stefanl@localhost ~]$ touch bar
[stefanl@localhost ~]$
Por que recebo um erro durante o login inicial, mas posso cd
para o mesmo diretório imediatamente depois?