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

Re: Classic Gnubie accident SOLVED



Thanks Jochen,

I think your mail made several reasonable points and contrary to what
you say, I find it perfectly coherent.

Its a tricky position to be in flailing around in a panic trying to
fix a system you need to be able to work and seeing the time, or
possibility of things being put back together receding from your
expectations.

You are right that I did not identify the problem very well initially,
but part of this was down to receiving an error that shut me out of
the normal environment from which I would diagnose things. Since the
error message referred to a .dmrc file I assumed this was the problem
until I could get further in .

I did read the Debian documentation on file permissions, before I made
requests to the list, whilst I can't say that I fully understood the
system of permissions I read enough to get the basic idea and also to
understand that my problem was not addressed there. I think, and this
can probably not be considered a flaw, the debian manual does not
address the issue of how to reset the permissions of a /home after it
has been recursively modified. As I'm sure anybody will tell me,
reading the manual is the antidote to making such a stupid mistake,
nonetheless stupid mistakes we do make.

I'm sorry if I appeared to be complaining, actually I was genuinely
amused by the situation, I was sitting fretting, tearing out my hair
whilst ppl in the same space were discussing their girlfriends, this
struck me as pretty funny and allowed me to take the situation a
little lighter. I don't think that as a Debian-user I have a 'right'
to assistance and choosing to use etch I was deliberately putting
myself where I would have to rely on my own defective wits and those
of others whom I could persuade to help me, or who I could hope would
help since, maybe I had helped them in the past.

In any case I started the mail in a provocative way as I estimated
this might be a good way to get the advice I was after, I certainly
don't have a problem with people taking over a thread, so sometimes
one has to shout if one wants to be heard.

So, I appreciate you taking the time to respond at length and
especially as you actually addressed my question in a way that I can
understand and perhaps even use to fix my problem.

'what should the permissions be for all the settings
> (invisible) files in my home directory /anthony/home ? Are they each
> different?'

Generally, nothing in your $HOME
should be world-readable and some files/directories even aren't allowed
to be group-readable. And almost nothing (except files in ~/bin/) has to
be executable. Normally you do not have to touch file permissions for
automatically created files at all.

And thanks to everybody else who chipped in too

All the best
Anthony

On 10/31/06, Jochen Schulz <ml@well-adjusted.de> wrote:
[Disclaimer: writing this mail took some time and I frequently jumped
 from topic to topic. Please excuse me if it doesn't appear to be very
 coherent.]

anthony:
>
> So, happy as I am that you guys found an excuse to chat about your
> respective girlfriends here, I think mine would prefer I talked to her
> a bit rather than staring at a screen uttering expletives,

I recognize you are frustrated and I am trying not to be rude, but
please understand a few things (which I suspect you got wrong, but maybe
the error is on my side. Additionally, I am not a native English
speaker, so don't mince my words):

- You do not own this thread. People are welcome to change the topic
  whenever they want. (Provided it is partly on-topic or at least
  doesn't annoy too many other people. Changing the subject would still
  be nice, though.)

- You do not have a right to have your questions answered. If you have a
  problem, many people are eager to help you. But consider that helping
  you costs *our* time as well (which we could use to talk to our
  girlfriends/wives).

Actually, I started to contribute two (on-topic) mails to this thread
that never hit the list, because I didn't finish them. The reason? I had
the impression that it is really hard to get the necessary information
from you. Your problem description was not very helpful and you didn't
send the information I explicitly asked for (~/.xsession-errors).
Additionally, I felt that you take no interest in understanding your
problem, you only waited for a magic command to fix your problem (like
that 'chmod -R 755' thing, which you really shouldn't have done -- see
below). This may not be true, but it was my impression and trying to
help you was too frustrating to do it in my spare time.

I know you are a newbie and as I said, many people are willing to help
you (myself included, or else I wouldn't have written this lengthy
mail). But you have to make it easier for us to help you. A few tips to
achieve this (not everything is applicable to your problem, only what I
have in mind as being helpful):

- If your problem applies to a specific piece of software, read its
  documentation (manpages and /usr/share/doc/$packagename). If you can,
  search the web for other documentation. Some programs do not contain
  their documentation in the same package as the program itself. In
  these cases there is very often another package with a name like
  $program-doc which you can install.

- Give a short introduction to your problem. That way people can quickly
  tell whether they may be able to help. If you took a look in the
  documentation but found your question/problem not to be covered,
  mention it.

- Describe exactly what you did or, if you didn't do anything specific,
  other circumstances you think might play a role.

- Describe what effect of your action (or non-action) you expected and
  what actually happened. Do *not* paraphrase error messages, but cite
  them exactly. (Exceptions are kernel oopses or panics, which cannot
  always easily be saved, at least not completely.)

- Search the internet for your error messages, if you have any. It is
  very seldom to be the first one to encounter a specific problem. If
  you find a solution but get stuck at some point, tell the list about
  this. That way, we have a good way of finding out how far you got
  *and* we find out that you do not expect us to solve your problems
  without trying yourself.

- (Minor) Do *not* assume you already know the reason for the problem if
  you are not absolutely sure. Tell us, *what* you want to achieve, not
  *how* (or at least, tell both).

- When following up on replies to your posting, try to give the
  information that has been asked for. If you do not know how to do
  that, ask.

- If a step-by-step solution is proposed (run commands x, y and then z),
  read the corresponding documentation so you understand what you are
  doing. If it is absolutely incomprehensible and not easily deciphered
  by reading manpages, ask what each command does.

- When asked to read some documentation, read it. If you do not
  understand all of it, try to ask a question as specific as possible.
  Sometimes, documentation is not at all helpful to a newbie. That's
  normal. So if you cannot ask a specific question, try to find other
  documentation on the topic which is more newbie-friendly. If you don't
  find anything, ask whether someone can explain it in different words.

This should of course not be taken strictly as a checklist, but it may
help to get useful answers and narrow down the source of a problem. When
trying to describe a problem throughly and with all the necessary
information, I sometimes even managed to solve it by myself because
writing a good call for help forced me to ask myself the right
questions.

> so I took
> the easy route, made another user, transferred the settings and files
> over from /home/anthony . Now I can startx and even check my mail!

Nice to hear.

> I'd like to know what exactly happened

I don't think there is a way to know this.

> and perhaps to get my user (anthony) and my settings back iat some
> point so, what should the permissions be for all the settings
> (invisible) files in my home directory /anthony/home ? Are they each
> different?

Yes, as someone else has already shown. Generally, nothing in your $HOME
should be world-readable and some files/directories even aren't allowed
to be group-readable. And almost nothing (except files in ~/bin/) has to
be executable. Normally you do not have to touch file permissions for
automatically created files at all.

Concerning 'chmod -R 755': this is almost always a bad idea, since it
makes all files world-readable. Additionally, it marks all files as
executable, although you cannot execute them. I guess this advice
(wherever you got it from) comes from the fact that after you do 'chmod
-R 644' you cannot list the contents of directories anymore because
directories *need* that bit set if you want to list their contents.

If you still have all your files set to mode 755 (another representation
of -rwxr-xr-x), you can fix this by running

$ find /home/anthony -type f -exec chmod 640 {} \;

This runs 'chmod 640' on every regular file (read: not directories,
pipes, symlinks end device files; 640 equals -rw-r-----) in the
specifiec directory. There are better ways to achieve this, but I always
forget them. :)

If you do not want every user to be able to list the contents of your
directories, you can run

$ find /home/anthony -type d -exec chmod 750 {} \;

However, I think you should read some introduction to Linux in general.
There are a few documents available via apt (packages doc-debian,
debian-reference), for example. And a quick search for "linux
permissions" reveals
http://www.zzee.com/solutions/linux-permissions.shtml which appears to
contain everything you need to know about the subject.

J.
--
When you put a gun to my head you aren't fooling anyone.
[Agree]   [Disagree]
                 <http://www.slowlydownward.com/NODATA/data_enter2.html>





Reply to: