Hi Chris. > Hi, I'm trying out Fossil
Fossil is pretty cool. Hope you like it. > and I got it working with the standalone > server (e.g. `fossil server repo.fossil`) but I like the idea of the > CGI approach and want to use that instead, only I can't get it to > work for some reason. The way my server is configured seems to be > creating a permissions error with Fossil, only once I started having > this problem, I immediately gave 777 permissions and apache ownership > to the repo.fossil and its containing directory /root/fossils/ (it's I wonder if Apache is going "Ack! 777 permissions! No way, Jose!" the way SSH does? Here's my "fossils" CGI dir, perhaps it will help you. fat...@nikko:~$ ls -l ~/http/fossils/ total 1232 -rw-r--r-- 1 fatman fatman 1231 2010-10-08 14:30 manifest -rw-r--r-- 1 fatman fatman 41 2010-10-08 14:30 manifest.uuid drwxr-xr-x 8 fatman fatman 4096 2010-10-08 14:18 RegexValidator -rwxr-xr-x 1 fatman fatman 78 2010-10-08 14:12 regexvalidator.cgi -rw-rw-r-- 1 fatman www-data 78848 2010-10-14 17:33 reg[...]tor.fossil drwxr-xr-x 9 fatman fatman 4096 2010-09-29 15:24 Reu2 -rwxr-xr-x 1 fatman www-data 68 2010-10-06 12:58 reu2.cgi -rw-rw-r-- 1 fatman www-data 1060864 2010-10-14 17:34 reu2.fossil -rwxr-xr-x 1 fatman fatman 70 2010-10-12 23:57 vprint.cgi -rw-rw-r-- 1 fatman www-data 67584 2010-10-12 23:58 vprint.fossil fat...@nikko:~$ The vprint fossil/CGI pair is probably the best example there. (It's the latest one.) You'll notice I have 755 on the CGI but 664 on the fossil. The CGI needs the execute bit but the fossil needs the write bit. Also note the web-server group on the fossil. fat...@nikko:~/https/downloads$ cat ~/http/fossils/vprint.cgi #!/usr/bin/fossil repository: /home/fatman/http/fossils/vprint.fossil fat...@nikko:~$ Oh, and there's a .htaccess in the parent directory containing: Options +FollowSymLinks +ExecCGI +Indexes AddHandler cgi-script .cgi You probably don't need FollowSymLinks or Indexes. Have a play with it. > a clean server install, CentOS 5.5 on a Rackspace Cloud Server, with > no normal users other than root) to guarantee it would work and yet > it still didn't solve the problem. When everyone can read and write > the repo file and directory, and it's owned by my webserver process, > how can fossil still not be able to read it? (Note: I confirmed that All you can do is keep going over it and over it until you find the one permission you forgot to set. You'll get there eventually. > the file path is correct and the apache configuration uses user+group > "apache".) Can anyone tell me what I'm missing that I need to change > to make this work? I'm betting it's something really simple and > obvious, so I'm sorry to have to ask, but I've spent a lot of time on > this already and would really appreciate some extra, more expert, > eyes on this one. Thanks. > > The error when loading the cgi script in my browser -- the same is > listed as the error response when attempting `fossil clone ...`: > "repository does not exist or is in an unreadable directory: > /root/fossils/repo.fossil" Make sure the parent directory has the execute bit. That's tripped me a few times. Try and access the fossil server in a browser, that's likely a bit easier than using Fossil. Oh, and don't do what I did and try to access the fossil directly. You'll wonder why your fossil is downloading instead of presenting a web page. > Here's the exact actual installation script I tested with: > > # blank rackspace cloud server centos 5.5 > > yum install -y unzip httpd > sed -i '327 s|^ AllowOverride None$| AllowOverride All|' > /etc/httpd/conf/httpd.conf > service httpd start > > iptables -I RH-Firewall-1-INPUT -p tcp --dport 80 -j ACCEPT > iptables -I RH-Firewall-1-INPUT -p tcp --dport 8080 -j ACCEPT > service iptables save > > wget > http://www.fossil-scm.org/download/fossil-linux-x86-20101005035549.zip > sudo unzip -o fossil-*.zip fossil -d /usr/bin/ > > mkdir /root/fossils/ && cd /root/fossils/ > fossil new repo.fossil > chmod -R 777 /root/fossils/ > chown -Rh apache:apache /root/fossils/ > fossil user new demo demo demo -R repo.fossil You installed in /root? This could be the source of your troubles. > mkdir /var/www/html/fossil/ > cat << EOF > /var/www/html/fossil/repo > #!/usr/bin/fossil > repository: /root/fossils/repo.fossil > EOF > cat << EOF > /var/www/html/fossil/.htaccess > Options +ExecCGI > SetHandler cgi-script > EOF > chmod 755 /var/www/html/fossil/repo > > # http://repos.example.com/fossil/repo > # fossil clone http://demo:[email protected]/fossil/repo > repo.fossil # >> repository does not exist or is in an unreadable > directory: /root/fossils/repo.fossil > > > Thanks. Good luck! _______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

