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

Re: Classic Gnubie accident

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


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

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


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

Reply to: