On Fri, May 27, 2011 at 9:44 AM, Oguz Altun <[email protected]> wrote:
> I have this wiki installation that I spend quite a time to install recipes, > write my own download application, etc... So, I want to just transfer (some > of) it to this new site, change the logo, skin, etc, and get a new site with > hopefully much less work. In fact It would be real fine to periodically sync > them, to ease maintaining. > > The two sites are running on linux machines, and my only access is through > ftp. So, no rsync or unison to me. Furthermore, my desktop machine is a > windows. So when I transfer to my desktop, e.g. by wget, permissions are > lost. Big down for me. > > So, how can I transfer/sync these two? Thx. > I think you've got a problem here that won't be solved in a single step... http://ask.metafilter.com/117897/Remembering-permissions FTP doesn't "do" permissions and ownership well. A little browsing came up with this tool: http://winscp.net/eng/index.php which may or may not be able to handle it. Looks like it does have some nice sync capabilities. But I don't think the permissions & ownership are really solvable by FTP in a generic way since you're dealing with cross-platform issues... This may be helpful in the sync-over-ftp realm as well (it's what I use as my backup solution both locally as well as to the cloud): http://www.2brightsparks.com/syncback/ (SyncBackSE has some helpful features that are definitely worth the price, but the freeware version should handle what you need at least at the start) Unfortunately I don't think any of these are solving your ownership and permission problems. However, maybe a simple custom action might be able to fix things for you -- try putting this in your config.php (or in a page-specific customization file): ===(snip)=== $HandleActions['fixperms'] = 'FixPerms'; $HandleAuth['fixperms'] = 'admin'; function FixPerms($pagename, $auth='admin') { if (!RetrieveAuthPage($pagename, $auth, true, READPAGE_CURRENT)) { Abort("?unable to read $pagename"); } foreach (ListPages() as $file) fixperms($file); } ===(snip)=== CAVEAT #1: I haven't actually tested it (minor detail - *grin*) but it's maybe a start in the right direction CAVEAT #2: I'm not sure what implications this might have security-wise... Other wiser folks will have to give their input on that. CAVEAT #3: I'm not sure if fixperms() will be able to handle the difference between FTP owner and apache owner... However, I think that's just a quick chown with a wildcard via FTP (could be included in an FTP script, I believe)... (Again, haven't tried it) The overall idea would be to sync with server #1 to your windoze machine, then sync to server #2 using the same directory in windoze. Now #2 and windoze are entirely most-recent. Then do the sync back to server #1 and all directories are in sync. Then load a page on each server with ?action=fixperms appended to the URL and theoretically everybody is a happy camper... -Peter
_______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
