View previous topic :: View next topic |
Author |
Message |
BrummieJim l33t
Joined: 22 Jul 2005 Posts: 683
|
Posted: Fri Feb 17, 2006 12:55 pm Post subject: Can't log into my account anymore[solved] |
|
|
Hi,
I had an urgent deadline last night and had just run out of disk space, so in a fit of panic, su'ed and fired off a
rm -r /tmp
oops.
I'd meant to type:
rm -r /tmp/*
When I realised what I'd done I recreated the /tmp directory.
Now when I try to log into my user account it gives me a x error and logs me out.
~/.xsession-errors contains the following;
/etc/X11/gdm/PreSession/Default: Registering your session with wtmp and utmp
/etc/X11/gdm/PreSession/Default: running: /usr/X11R6/bin/sessreg -a -w /var/log/wtmp -u /var/run/utmp -x "/var/gdm/:0.Xservers" -h "" -l ":0" "ja"
/etc/X11/gdm/Xsession: Beginning session setup...
/etc/X11/gdm/Xsession: Setup done, will execute: /usr/bin/ssh-agent -- gnome-session
mkdtemp: private socket dir: Permission denied
I presume I've got to do something clever with the /tmp permissions, but don't want to start chmod'ing everything in sight and make the situation worse. Can anyone offer any advice. Apologise for the absence of thought that lead to this, but I was _very_ stressed.
Thank you!
Last edited by BrummieJim on Mon Feb 20, 2006 6:48 pm; edited 1 time in total |
|
Back to top |
|
|
chrbecke Guru
Joined: 12 Jul 2004 Posts: 598 Location: Berlin - Germany
|
Posted: Fri Feb 17, 2006 1:11 pm Post subject: |
|
|
My tmp perms are: Code: | ls -ld /tmp/
drwxrwxrwt 32 root users 2728 17. Feb 14:50 /tmp/ |
HTH |
|
Back to top |
|
|
BrummieJim l33t
Joined: 22 Jul 2005 Posts: 683
|
Posted: Fri Feb 17, 2006 1:19 pm Post subject: |
|
|
Hi,
Cheers, I'm just wondering what the t at the end of the permissions list is? |
|
Back to top |
|
|
BrummieJim l33t
Joined: 22 Jul 2005 Posts: 683
|
Posted: Fri Feb 17, 2006 1:31 pm Post subject: |
|
|
Right, set everything up as above, except with an x replacing the t and it's still failed. hmmm, stumped. checked the hard drive space on that partition and it's got 90% used, so space shouldn't be a problem |
|
Back to top |
|
|
chrbecke Guru
Joined: 12 Jul 2004 Posts: 598 Location: Berlin - Germany
|
Posted: Fri Feb 17, 2006 2:22 pm Post subject: |
|
|
See for the 't'.
I think you should set it, because it is a security feature. If you don't set it, all users are allowed to delete all files from /tmp, regardless if they have write access to the file or not. With the 'sticky bit' set, users can only delete files they own.
And if your filesystem is 90% full, you should clean it, because fs performance will decrease due to fragmentation. See the reiserfs faq or search the forums for "filesystem fragmentation". |
|
Back to top |
|
|
BrummieJim l33t
Joined: 22 Jul 2005 Posts: 683
|
Posted: Fri Feb 17, 2006 2:51 pm Post subject: |
|
|
I've set the sticky bit, but it still doesn't work.
It's now saying in ~/.xsession-errors
/etc/X11/gdm/PreSession/Default: Registering your session with wtmp and utmp
/etc/X11/gdm/PreSession/Default: running: /usr/X11R6/bin/sessreg -a -w /var/log/wtmp -u /var/run/utmp -x "/var/gdm/:0.Xservers" -h "" -l ":0" "ja"
/etc/X11/gdm/Xsession: Beginning session setup...
/etc/X11/gdm/Xsession: Setup done, will execute: /usr/bin/ssh-agent -- gnome-session
mkdtemp: private socket dir: No space left on device
but a df /dev/hda* gives this;
Filesystem 1K-blocks Used Available Use% Mounted on
udev 517056 288 516768 1% /dev
udev 517056 288 516768 1% /dev
udev 517056 288 516768 1% /dev
/dev/hda5 101086 12847 83020 14% /boot
/dev/hda6 19236308 18220236 38920 100% /
udev 517056 288 516768 1% /dev
/dev/hda8 41223308 34868768 4260472 90% /home
It's saying / is full, but I've not but anything on it recently and it should still have a gig on it looking at the /dev/hda6 blocks and the number used. |
|
Back to top |
|
|
chrbecke Guru
Joined: 12 Jul 2004 Posts: 598 Location: Berlin - Germany
|
Posted: Fri Feb 17, 2006 3:20 pm Post subject: |
|
|
Trust your machine: If you get "No space left on device", and df shows 100% usage, your fs is full.
BTW, df shows 38920 1K-blocks available for /dev/hda6, which is ~39 MB.
If you don't want to twist your brain on the unit conversion, try "df -h", which gives you sizes in MB or GB.
You definitly have to clean up your system:
- You can safely delete everything in /var/tmp/portage.
- Check /var/log and delete old log files.
- Delete everything from /usr/portage/distfiles.
|
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Fri Feb 17, 2006 3:22 pm Post subject: |
|
|
BrummieJim wrote: | I've set the sticky bit, but it still doesn't work. |
Just to be clear, the command is:
|
|
Back to top |
|
|
BrummieJim l33t
Joined: 22 Jul 2005 Posts: 683
|
Posted: Fri Feb 17, 2006 3:26 pm Post subject: |
|
|
Ah ha! 6.7G kern.log file, ouch! I think I'll delete that! |
|
Back to top |
|
|
BrummieJim l33t
Joined: 22 Jul 2005 Posts: 683
|
Posted: Mon Feb 20, 2006 6:48 pm Post subject: |
|
|
Actually it was that I'd set the sticky bit incorrectly.
chmod 1777 /tmp
saved the day and got it working!
Thanks |
|
Back to top |
|
|
|