FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-03-2008, 07:53 PM
Stephan Seitz
 
Default broken system after srm -r -d /tmp/.* (user login and several services not working)

On Thu, Jul 03, 2008 at 06:58:08PM +0200, Jonas Meurer wrote:
[snip]
[pid 17413] execve("/bin/bash", ["bash"], [/* 16 vars */]) = -1 EACCES
(Permission denied)

[pid 17413] open("/usr/share/locale/locale.alias", O_RDONLY) = -1 EACCES (Permission denied)
[pid 17413] open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/shadow.mo", O_RDONLY) = -1 EACCES (Permission denied)

[snip]
[pid 17413] write(2, "Cannot execute /bin/bash: Permis"..., 44Cannot
execute /bin/bash: Permission denied) = 44

[snip]

stat("/etc/localtime", 0x7fff302962f0) = -1 EACCES (Permission denied)
open("/etc/localtime", O_RDONLY) = -1 EACCES (Permission denied)
socket(PF_FILE, SOCK_DGRAM, 0) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
connect(3, {sa_family=AF_FILE, path="/dev/log"}, 110) = -1 EACCES (Permission denied)

[snip]

This is very strange. /dev/log was opened before with success. Are the
permissions of the directory „/usr/share/locale” correct? What are the
permissions of /etc/localtime and /bin/bash? What says „file /bin/bash”
and „ldd /bin/bash”?


Shade and sweet water!

Stephan

--
| Stephan Seitz E-Mail: Nur-Ab-Sal@gmx.de |
| PGP Public Keys: http://fsing.rootsland.net/~stse/pgp.html |
 
Old 07-03-2008, 08:02 PM
Jochen Schulz
 
Default broken system after srm -r -d /tmp/.* (user login and several services not working)

Jonas Meurer:
>
> But I discovered something really strange. If I compare the output of
> 'ls -al /' on my system and in the chroot, several directory sizes seem
> to be different. I thought that directorys always have a size of
> 4069 bytes, but apparently this is not the case:

No, it's not and your output is not unusual at all.

Directories contain references to all files and direcotries in them
(non-recursively). If these references don't fit into 4kB, it grows
automatically. Recently I have seen an directory which occupied more
than 1MB of disk space because it contained (IIRC) a few hundred
thousand files. /sys and /proc show a size of zero because they are
virtual filesystems and don't contain real files. If you mount your root
filesystem somewhere else, you'll probably see that the real directories
(which are shadowed by the virtual filesystems mounten on them) occupy
4kB as well.

(I won't comment on the strace since I could only guess what's wrong
with that.)

J.
--
My drug of choice is self-pity.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
 
Old 07-04-2008, 04:35 PM
Jonas Meurer
 
Default broken system after srm -r -d /tmp/.* (user login and several services not working)

On 03/07/2008 Sven Joachim wrote:
> > But I discovered something really strange. If I compare the output of
> > 'ls -al /' on my system and in the chroot, several directory sizes seem
> > to be different. I thought that directorys always have a size of
> > 4069 bytes, but apparently this is not the case:
>
> The size of directories is a multiple of the inode size, at least in
> ext2/3 filesystems (might be different in reiserfs, I'm no expert). If
> a directory has many entries, its size grows and will not shrink back if
> you delete these entries. Since your system has been in use for several
> years, the differences are not so strange.

Ah, that explains the differences. thanks for the information.

> > (on system) # ls -al /
> > total 113
> > drwx------ 24 root root 4096 2008-07-03 18:51 .
> > drwx------ 24 root root 4096 2008-07-03 18:51 ..
> > [...]
>
> Now to the failing su (and login) for non-root users: Have a close look
> at the first lines of your directory listing and tell me if you see
> anything strange. ;-)
>
> I bet that after "chmod 755 /" you will be able to log in as a normal
> user again and your services will start to function. :-)

Yay, that's it! Everything works as expected again. Thanks a lot!!!

I don't know why I didn't find it earlier myself.

thanks for all your help, you rock!

greetings,
jonas


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 09:19 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org