[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Classic Gnubie accident



So

from failsafe terminal, after login

anthony@thinking:/$ cd /home/anthony/
bash: cd: /home/anthony/: Permission denied
anthony@thinking:/$ pwd
/
anthony@thinking:/$ id
uid=1000(anthony) gid=1000(anthony) groups=20(dialout),24(cdrom),25(floppy),$
anthony@thinking:/$
anthony@thinking:/$ ls -l /home
total 60
drw-r--r-- 69 anthony anthony  4096 2006-10-30 11:31 anthony
drwx------  2 root    root     4096 2006-07-18 11:20 dyne
drwxr-xr-x  2 guest   guest    4096 2006-10-27 02:37 guest
drwxr-xr-x  2 root    root    49152 2006-03-12 21:46 lost+found

appears that I have lost execute permissions for my /home/anthony

so
chmod u+x /home/anthony

then
anthony@thinking:/$ ls -l /home
total 60
drwxr--r-- 69 anthony anthony  4096 2006-10-30 11:31 anthony
drwx------  2 root    root     4096 2006-07-18 11:20 dyne
drwxr-xr-x  2 guest   guest    4096 2006-10-27 02:37 guest
drwxr-xr-x  2 root    root    49152 2006-03-12 21:46 lost+found

anthony@thinking:/$ cd /home/anthony/
anthony@thinking:~$ ls
audio       current_writing  film    mute      Polly             tech
background  Desktop          images  nicotine  Projects_Archive  use
com         dl               music   pd        reading           writing

seems ok?

anthony@thinking:~$ pwd
/home/anthony
anthony@thinking:~$ id
uid=1000(anthony) gid=1000(anthony) groups=20(dialout),24(cdrom),25(floppy),$

Is this all correct?

When exit failsafe and try to login as myself (username=anthony) I get a blank blueish screen and eventually get booted back to gdm (if it is gdm that is the problem I am happy to loose this and 'log in like a real geek' but it appears something else is still the matter i.e. something up with all the permissions for /home/anthony

On 10/30/06, anthony <mailinganthony@googlemail.com > wrote:
Hi there,

I don't have a problem getting at the files, booting single user or into a failsafe terminal as myself (username=anthony) the problem is exactly how to correctly 'check/fix owner/permissions until you are happy.'

I just need to know what ownership and permissions my /home/anthony folder should be set to and how to do this safely as root (I cannot access these files as myself (username=anthony). I.e. I need to know the exact commands and how to check afterwards the permissions have been set correctly

thanks
Anthony


On 10/30/06, Douglas Tutty < dtutty@porchlight.ca> wrote:
On Sun, Oct 29, 2006 at 01:40:39PM -0800, Jeff Goodman wrote:
> anthony wrote:
> >Hello
> >
> >I'm embarrassed to admit this, but after using various flavours of
> >debian for over a year 've managed to lock myself out of my /home
> >directory. When I log in I get the message - your home directory .dmrc
> >file has the wrong permissions - permissions should be set to 664
> >
> >(its actually the whole /home directory that has the wrong permissions)
> >
> >I have tried logging in to a failsafe terminal and fixing this by using
> >chown username  /home/anthony/.dmrc
> >
> >the file now has these permissions:
> >
> >-rw-rw-r-- 1 anthony anthony 26 2006-09-21 18:56 /home/anthony/.dmrc
> >
> >but the login message is the same.
> >
> >I am reading the debian manual on file permissions, but I don't see an
> >obvious way to reset this especially since I only have access to this
> >file as root.
> >
> >Any help much appreciated
> >
> Not sure if booting in single-user mode will give you root permission.
> If not, boot Knoppix, or some other live distro, mount your Debian
> partition, and do whatever tweaking is necessary.
>

If booting in single-user mode doesn't work, boot into a shell.

        I don't know what boot loader you're using but if you
        haven't pre-configured a boot option that gives you a shell,
        you need to note the whole kernel boot command line,

then reboot but when you get the boot prompt (lilo, grub, whatever),
enter your kernel boot command line and add init=/bin/sh (or dash if its
installed).

At this point nothing is mounted.  Check the owner/permissions of the
/home mount point and fix as needed.

Then go to /etc/rcS.d and manually start each script in the order listed
with (for example on mine):
        ./S02mountvirtfs start

until /home is mounted, then you can descend the /home directory and
check/fix owner/permissions until you are happy.

Then you have to manually go through /etc/rc0.d and run the scripts
starting with (on mine)
        ./S40umountfs start (because it the first letter is 'S')

Then power off and try a single-mode boot.  If that works, try a normal
boot.

Doug.


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




Reply to: