Re: Nitpicks? -- permissions

2010-09-13 Thread Paul Bijnens

On 2010-09-12 17:25, Dustin J. Mitchell wrote:

On Sat, Sep 11, 2010 at 10:42 PM, Lisa Seelye l...@thedoh.com wrote:

Disk permissions and file permissions are always a nightmare. Some things
aren't right and amcheck complains about each one in turn. It would be
useful to have some kind of thorough lint mode, perhaps with a
--fix-permissions to repair the permissions (when run with root).


Ideally amcheck would be finding all of the permissions problems on
the first run - although sometimes one permission problem can make it
impossible to find the next.  Is there some specific condition that
you're seeing appear only on the second run?

As for adding a --fix-permissions option is an interesting idea, but I
worry that it would blindly 'mkdir' and 'chown' and 'chmod' things
that you might not want it to.  Note that many missing directories are
created at first run.  If some of those are missing, we could fix that
up.

Do you have a particular example you'd like me to look at?


I remember a few requests for help on this list, when someone ran the very
first time as user root, so all the folders and files were created as root.
Maybe just to do some test run the very first time, while trying
to get it compiled etc.

When then later trying to run as the amandabackup user you're
in trouble, as e.g. even the debug folder is not even writable by amanda
and you have no immediate clue about what is going wrong.


--
Paul Bijnens, XplanationTel  +32 16 397.525
Interleuvenlaan 86, B-3001 Leuven, BELGIUM  Fax  +32 16 397.552
***
* I think I've got the hang of it now:  exit, ^D, ^C, ^\, ^Z, ^Q, ^^, *
* quit, ZZ, :q, :q!, M-Z, ^X^C, logoff, logout, close, bye, /bye, ~., *
* stop, end, ^]c, +++ ATH, disconnect,  halt,  abort,  hangup,  KJOB, *
* ^X^X,  :D::D,  kill -9 1,  kill -1 $$,  shutdown,  init 0,  Alt-F4, *
* Alt-f-e, Ctrl-Alt-Del, Alt-SysRq-reisub, Stop-A, AltGr-NumLock, ... *
* ...  Are you sure?  ...   YES   ...   Phew ...   I'm out  *
***


Re: Nitpicks? -- permissions

2010-09-13 Thread Lisa Seelye

quote who=Dustin J. Mitchell
 On Sat, Sep 11, 2010 at 10:42 PM, Lisa Seelye l...@thedoh.com wrote:

 Disk permissions and file permissions are always a nightmare. Some
 things aren't right and amcheck complains about each one in turn. It
 would be useful to have some kind of thorough lint mode, perhaps with
 a --fix-permissions to repair the permissions (when run with root).


 Ideally amcheck would be finding all of the permissions problems on
 the first run - although sometimes one permission problem can make it
 impossible to find the next.  Is there some specific condition that you're
 seeing appear only on the second run?

 As for adding a --fix-permissions option is an interesting idea, but I
 worry that it would blindly 'mkdir' and 'chown' and 'chmod' things that you
 might not want it to.  Note that many missing directories are created at
 first run.  If some of those are missing, we could fix that up.

 Do you have a particular example you'd like me to look at?


When I first configured Amanda on my Gentoo servers some time ago I ran
into the problem where several installed files were not correctly owned or
had improper permissions. I would correct one, perhaps in
/var/spool/amanda and re-run amcheck and another fault would come up.

While this may be the fault of the .ebuild author having not correctly set
the permissions my memory is that configuring the permissions and
ownerships correctly was a big pain. An included tool to check all
required files/directories in one pass (instead of bailing at the first
error) would be very useful.


-- 
Regards,
-Lisa
http://www.crudvision.com



Re: Nitpicks? -- permissions

2010-09-13 Thread Dustin J. Mitchell
I'm sorry to sound pedantic here, but I think this is a case where we
can only fix it by looking at specific problems.  Amcheck is pretty
careful to give as many error messages as possible in each run, rather
than simply bailing out after the first, so if there's a case where
this does not happen, it's a bug that's been missed for some time now.

On Mon, Sep 13, 2010 at 12:59 AM, Paul Bijnens
paul.bijn...@xplanation.com wrote:
 When then later trying to run as the amandabackup user you're
 in trouble, as e.g. even the debug folder is not even writable by amanda
 and you have no immediate clue about what is going wrong.

I *think* we've fixed the problem with the debug directories now -
every script checks that it's running as the appropriate user, and
once the debug directories are created, they are chown'd to the
dumpuser.

On Mon, Sep 13, 2010 at 7:26 AM, Lisa Seelye l...@thedoh.com wrote:
 When I first configured Amanda on my Gentoo servers some time ago I ran
 into the problem where several installed files were not correctly owned or
 had improper permissions. I would correct one, perhaps in
 /var/spool/amanda and re-run amcheck and another fault would come up.

If /var/spool/amanda is a holdingdisk, then there shouldn't be any
follow-on permissions problem for it - it either has the right
permissions or not, right?  I'm still nervous about automatically
fixing permissions (even though amcheck runs setuid root)..

Is there any chance you or Stefan could do a fresh install from the
updated ebuilds (I believe robbat has just put 3.1.2 in ~x86) and see
what problems you come to?  They'll make good gentoo bugs for the
ebuild, but also a good concrete symptom that we can look at fixing in
Amanda.

Dustin

-- 
Open Source Storage Engineer
http://www.zmanda.com


Re: Nitpicks? -- permissions

2010-09-12 Thread Dustin J. Mitchell
On Sat, Sep 11, 2010 at 10:42 PM, Lisa Seelye l...@thedoh.com wrote:
 Disk permissions and file permissions are always a nightmare. Some things
 aren't right and amcheck complains about each one in turn. It would be
 useful to have some kind of thorough lint mode, perhaps with a
 --fix-permissions to repair the permissions (when run with root).

Ideally amcheck would be finding all of the permissions problems on
the first run - although sometimes one permission problem can make it
impossible to find the next.  Is there some specific condition that
you're seeing appear only on the second run?

As for adding a --fix-permissions option is an interesting idea, but I
worry that it would blindly 'mkdir' and 'chown' and 'chmod' things
that you might not want it to.  Note that many missing directories are
created at first run.  If some of those are missing, we could fix that
up.

Do you have a particular example you'd like me to look at?

Dustin

-- 
Open Source Storage Engineer
http://www.zmanda.com


Re: Nitpicks? -- permissions

2010-09-11 Thread Lisa Seelye
quote who=Dustin J. Mitchell
 I bet most of you have some small nitpick with Amanda that you've
 never felt warranted an email.  Well, now's your chance!  I'd like to put
 some polish on Amanda, and it's hard for me to see the areas that need
 burnishing, since I work on Amanda all day, every day.

 - typo in a manpage?
 - command-line usage oddity?
 - confusing use of terminology?
 - something else?


 Start up a new thread on the mailing list, or email me privately if
 you'd prefer, to let me know what's bugging you.  Bonus points for also
 supplying a patch, but that's not at all required!

 Note that I do reserve the right to say, actually, that's
 complicated (and explain why).

 Dustin

Disk permissions and file permissions are always a nightmare. Some things
aren't right and amcheck complains about each one in turn. It would be
useful to have some kind of thorough lint mode, perhaps with a
--fix-permissions to repair the permissions (when run with root).

This one is for 2.6 series, I don't know if it's been addressed in a later
version.

-- 
Regards,
-Lisa
http://www.crudvision.com