[pmwiki-users] restore

Kathryn Andersen kat_lists at katspace.homelinux.org
Wed Sep 13 21:27:27 CDT 2006


On Wed, Sep 13, 2006 at 08:47:11PM -0500, JB wrote:
> > > What if I have a hundred wikis on a farm?
> > > Cannot restore also restore the ownership, etc
> > > of the wiki.d?
> > 
> > On a Unix/Linux system, if wiki.d/ was originally
> > owned by a different account, then superuser privileges
> > are needed to restore file ownerships.  (That's just the
> > way that Unix works -- only superuser can change or set
> > file ownerships.)

To be precise, only the superuser can change or set file ownerships for
*other users*.
 
> I think you are saying that the only working way of restoring 
> a backup from a single tar command is to either be a superuser
> or get a superuser to do it for you.  You/they also have to know 
> how to "restore file ownerships".

No, that's not *quite* the case.  The problem arises because, in most
setups with Unix/Linux and Apache, the "apache" user is the one that
creates (and owns) all the files in wiki.d. But they are readable by
other uses, so you, as another user, can create a tar archive of wiki.d
without trouble.  But when you restore it, since you are not the
superuser, it can only be given *your* id as the owner, rather than
"apache".  This can make difficulties because the apache user needs to
be able to create and modify files in the wiki.d directory.
However, you can get around this by
(a) restoring wiki.d anyway, then using the "chmod" command to give
write access to "other" users (including apache).  This is less secure,
but easier to do
(b) install your pmwiki, and let Apache (the apache user) create the
wiki.d directory (so it will have okay permissions for apache) and then
restore the contents of wiki.d into it.  This might not work because the
apache user might have made the directory so that normal users couldn't
add files to it anyway.
 
> I know that I am not a "superuser".  So if I need my friendly 
> superuser to do a restore, what do I tell him/her to do?

Your system adminstrator will be a superuser.  If you can get their
cooperation, what would probably be simplest is to restore the wiki.d
directory yourself, and then ask the superuser to change it (and files
in it) so they are owned by the apache user.

Kathryn Andersen
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe




More information about the pmwiki-users mailing list