1 |
On Wednesday 24 February 2010 12:16:24 Paweł Hajdan, Jr. wrote: |
2 |
> While you're touching this, could you improve this part a bit: |
3 |
> |
4 |
> # maybe the user is screwing around with perms they shouldnt #289168 |
5 |
> if [[ ! -r ${base} ]] ; then |
6 |
> eerror "Unable to read ${base} -- perms are screwed ?" |
7 |
> die "fix your system" |
8 |
> fi |
9 |
> |
10 |
> I understand frustration caused by weird things people are doing with |
11 |
> systems, but sometimes it can be even caused by some tool's error or |
12 |
> whatever. IMHO these are not good error messages. I'd prefer something |
13 |
> like this: |
14 |
> |
15 |
> # Make sure we don't hit a problem with permissions, bug #289168 |
16 |
> if [[ ! -r ${base} ]] ; then |
17 |
> eerror "Unable to read ${base}. Please run chmod 755 ${base}" |
18 |
> eerror "and try again." |
19 |
> die "unable to read ${base}" |
20 |
> fi |
21 |
|
22 |
the issue is in basic assumptions. you're assuming that -r means a chmod will |
23 |
fix it because the error is due to missing +r bits. i make no assumptions and |
24 |
merely propose the most likely problem category (missing +r bits). a subtle, |
25 |
but important, distinction (at least in my mind). |
26 |
-mike |