On Sun, Jun 16, 2013 at 7:42 PM, Doug Franklin <[email protected]>wrote:
> Howdy, folks, > > I'm trying for the first time to get Fossil hooked up via CGI with my > "tame" Apache server. It's running on 32-bit x86 Linux. It's a pretty > much bone stock Apache on Linux install, with modules alias and mod_cgi > installed. The scripts for my two Fossil repositories are the only thin in > the cgi-bin directory, even. > > I've got two repositories. They live in my ~/fossil directory. The > actual repository files are both 644 permissions, owned my my user. > > To hook them up to CGI, I created soft links from /usr/share/fossil to > each of the .fossil repository files in ~/fossil. These soft links are > owned by root. They currently have l777 permissions, probably as a result > of my dinking around trying to fix this issue. > Fossil repositories are SQLite databases. You should never create links (hard or soft) of SQLite databases since that can lead to database corruption. See http://www.sqlite.org/howtocorrupt.html#alias for additional information. Visit the "test_env" URL on your Fossil repository (for example, replace "timeline" with "test_env") to find out what user your CGI is running as. Make sure wherever you have to Fossil repositories stored is readable and writable by that user. Just be sure to store the repositories in that one particular place, not as symbolic or hard links. > > Then I created two files in /usr/lib/cgi-bin, one for each repository. > > /usr/lib/cgi-bin/DAV: > #!/usr/bin/fossil > repository: /usr/share/fossil/DAV.fossil > > /usr/lib/cgi-bin/LocalEnv: > #!/usr/bin/fossil > repository: /usr/share/fossil/LocalEnv.**fossil > > These files have permissions 755 and are owned by root. > > Accessing the DAV.fossil repository over CGI works just fine with the URL > http://$MYSERVER/cgi-bin/DAV and all operations appear to work as > expected. > > However trying to access LocalEnv.fossil using > http://$MYSERVER/cgi-bin/**LocalEnv > results in a database error after redirecting to $MYSERVER/cgi-bin/LocalEnv/ > **doc/tip/home.md: > > attempt to write a readonly database: {CREATE TABLE IF NOT EXISTS > vcache(vid INTEGER, fname TEXT, rid INTEGER, UNIQUE(vid,fname,rid))} > > If I go to ~/fossil I can use fossil rebuild $REPOSITORY successfully. If > I go to /usr/share/fossil, I have to use sudo fossil rebuild $REPOSITORY, > but for both of them. That makes sense since root owns the ones in > /usr/share/fossil and my local user the ones in ~/fossil. > > In each location, the cgi-bin scripts and the .fossil repository files > have the same permissions, but the DAV repository works and the LocalEnv > repository throws up errors over CGI. > > The only difference I can think of, besides their contents, is that the > LocalEnv repository uses embedded documentation and uses > $HOST/cgi-bin/$REPOS/home/**tips/home.md as the home page while the DAV > repository just lets everything default and uses the default > $HOST/cgi-bin/$REPOS/home URL. > > Any suggestions would be gleefully appreciated! > > -- > Thanks, > DougF (KG4LMZ) > ______________________________**_________________ > fossil-users mailing list > [email protected].**org <[email protected]> > http://lists.fossil-scm.org:**8080/cgi-bin/mailman/listinfo/**fossil-users<http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users> > -- D. Richard Hipp [email protected]
_______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

