/bin/bash Permiso denegado

Aldrin Martoq amartoq en dcc.uchile.cl
Jue Jul 3 18:19:15 CLT 2008


On Wed, 2008-07-02 at 10:26 -0400, Wladimir Torres Correa wrote:
> > root en videopodcast:~# cd /
> > root en videopodcast:/# ls -ld .
> > drwxr-xr-x 22 root root 4096 2008-07-01 15:20 .
> > > mpudahuel:/# su usuario
> > > No puedo ejecutar /bin/bash: Permiso denegado
> > # apt-get install strace
> > # strace -fo /tmp/strace su usuario
> > Ahora mira el archivo /tmp/strace y veras que archivo tiene "permiso
> > denegado".
> Efectivamente hice un chmod -R 
> En raiz tengo:
> drwxr-xr-x 24 root root 4096 jul  2 08:25 
> El strace me informa:
> .....path="/dev/log"}, 16) = -1 EACCES (Permission denied) 
> ....("/bin/bash", ["bash"], [/* 28 vars */]) = -1 EACCES (Permission
> denied)

No dijo mucho. Solo que no puedes acceder a /bin/bash. Esto puede ser
porque el usuario no puede acceder /, /bin o /bin/bash. Compara tus
permisos con esta salida:

$ sudo ls -ld $(dpkg --listfiles base-files) | awk '{print $1, $8}'
[sudo] password for amartoq: 
drwxr-xr-x /.
drwxr-xr-x /bin
drwxr-xr-x /boot
drwxr-xr-x /dev
drwxr-xr-x /etc
-rw-r--r-- /etc/debian_version
drwxr-xr-x /etc/default
-rw-r--r-- /etc/host.conf
-rw-r--r-- /etc/issue
-rw-r--r-- /etc/issue.net
-rw-r--r-- /etc/lsb-release
drwxr-xr-x /etc/profile.d
drwxr-xr-x /etc/skel
drwxr-xr-x /home
drwxr-xr-x /lib
drwxr-xr-x /mnt
dr-xr-xr-x /proc
drwxr-xr-x /root
drwxr-xr-x /sbin
drwxrwxrwt /tmp
drwxr-xr-x /usr
drwxr-xr-x /usr/bin
drwxr-xr-x /usr/games
drwxr-xr-x /usr/include
drwxr-xr-x /usr/lib
drwxr-xr-x /usr/sbin
drwxr-xr-x /usr/share
drwxr-xr-x /usr/share/base-files
-rw-r--r-- /usr/share/base-files/dot.bashrc
-rw-r--r-- /usr/share/base-files/dot.profile
-rw-r--r-- /usr/share/base-files/info.dir
-rw-r--r-- /usr/share/base-files/motd
-rw-r--r-- /usr/share/base-files/motd.md5sums
-rw-r--r-- /usr/share/base-files/networks
-rw-r--r-- /usr/share/base-files/nsswitch.conf
-rw-r--r-- /usr/share/base-files/profile
-rw-r--r-- /usr/share/base-files/profile.md5sums
drwxr-xr-x /usr/share/common-licenses
-rw-r--r-- /usr/share/common-licenses/Artistic
-rw-r--r-- /usr/share/common-licenses/BSD
lrwxrwxrwx /usr/share/common-licenses/GFDL
-rw-r--r-- /usr/share/common-licenses/GFDL-1.2
lrwxrwxrwx /usr/share/common-licenses/GPL
-rw-r--r-- /usr/share/common-licenses/GPL-2
-rw-r--r-- /usr/share/common-licenses/GPL-3
lrwxrwxrwx /usr/share/common-licenses/LGPL
-rw-r--r-- /usr/share/common-licenses/LGPL-2
-rw-r--r-- /usr/share/common-licenses/LGPL-2.1
-rw-r--r-- /usr/share/common-licenses/LGPL-3
drwxr-xr-x /usr/share/dict
drwxr-xr-x /usr/share/doc
drwxr-xr-x /usr/share/doc/base-files
-rw-r--r-- /usr/share/doc/base-files/changelog.gz
-rw-r--r-- /usr/share/doc/base-files/copyright
-rw-r--r-- /usr/share/doc/base-files/FAQ
-rw-r--r-- /usr/share/doc/base-files/README.base
-rw-r--r-- /usr/share/doc/base-files/README.FHS
-rwxr-xr-x /usr/share/doc/base-files/remove-base
drwxr-xr-x /usr/share/info
drwxr-xr-x /usr/share/man
drwxr-xr-x /usr/share/misc
drwxrwsr-x /usr/src
drwxr-xr-x /var
drwxr-xr-x /var/backups
drwxr-xr-x /var/cache
drwxr-xr-x /var/lib
drwxr-xr-x /var/lib/dpkg
drwxr-xr-x /var/lib/misc
drwxrwsr-x /var/local
drwxrwxrwt /var/lock
drwxr-xr-x /var/log
drwxr-xr-x /var/run
drwxr-xr-x /var/spool
drwxrwxrwt /var/tmp


-- 
Aldrin Martoq <amartoq en dcc.uchile.cl>
http://aldrinvideopodcast.podshow.com/




Más información sobre la lista de distribución Linux