summaryrefslogtreecommitdiff
path: root/doc/faq.html
blob: ff0999ab0a9e512edb725785692642a258cb0176 (plain)
  1. <ul>
  2. <p><li><h4>PostgreSQL 8.x</h4>
  3. PostgreSQL added a restriction in v8.x that a sequence cannot be dropped
  4. after if it is referenced by a table. However backups created with
  5. LedgerSMB v2.6.13 and earlier have a DROP SEQUENCE step in the backup
  6. which will fail. To fix this edit the backup before restoring on a 8.x
  7. system.
  8. <p>This typically looks like this:
  9. <pre>
  10. DROP SEQUENCE id ;
  11. CREATE SEQUENCE id START 10579;
  12. --
  13. DROP SEQUENCE invoiceid ;
  14. CREATE SEQUENCE invoiceid START 11096;
  15. --
  16. DROP SEQUENCE orderitemsid ;
  17. CREATE SEQUENCE orderitemsid START 178;
  18. --
  19. DROP SEQUENCE jcitemsid ;
  20. CREATE SEQUENCE jcitemsid START 53;
  21. </pre>
  22. <p>Change it to:
  23. <pre>
  24. CREATE SEQUENCE id;
  25. SELECT SETVAL('id', 10579);
  26. CREATE SEQUENCE invoiceid;
  27. SELECT SETVAL('invoiceid', 11096);
  28. CREATE SEQUENCE orderitemsid;
  29. SELECT SETVAL('orderitemsid', 178);
  30. CREATE SEQUENCE jcitemsid;
  31. SELECT SETVAL('jcitemsid', 53);
  32. </pre>
  33. <p><li><h4>PostgreSQL template1</h4>
  34. template1 is a template to build new databases
  35. from. Anything you put into template1 will be copied to a new database.
  36. So when you try to create a new dataset, the tables are already created from
  37. template1 and when LedgerSMB tries to create them you'll get an error that
  38. the tables already exist.
  39. <p><li><h4>PostgreSQL 8.0+</h4>
  40. To use LedgerSMB with 8.0+ you have to modify Pg-tables.sql The file
  41. is in the sql directory.
  42. <pre>
  43. CREATE TABLE orderitems (
  44. trans_id int,
  45. parts_id int,
  46. description text,
  47. qty float4,
  48. sellprice float8,
  49. discount float4,
  50. unit varchar(5),
  51. project_id int,
  52. reqdate date,
  53. ship float4,
  54. serialnumber text,
  55. id int default nextval('orderitemsid')
  56. ) WITH OIDS;
  57. CREATE TABLE inventory (
  58. warehouse_id int,
  59. parts_id int,
  60. trans_id int,
  61. orderitems_id int,
  62. qty float4,
  63. shippingdate date,
  64. employee_id int
  65. ) WITH OIDS;
  66. CREATE TABLE assembly (
  67. id int,
  68. parts_id int,
  69. qty float,
  70. bom bool,
  71. adj bool
  72. ) WITH OIDS;
  73. </pre>
  74. This change is only required for LedgerSMB versions 2.6.3 and below.
  75. <p>If you already built a dataset without this change you will get
  76. an error when you try to save a PO or assembly.
  77. <p>"ERROR: column "oid" does not exist"
  78. <p>Drop the tables and rebuild WITH OIDS.
  79. <p><li><h4>Japanese characters</h4>
  80. modify apache so that EUC_JP is the main additional language.
  81. <br>comment out all unrelated languages except, UTF_8 shift jis, EUC_JP
  82. <br>restart apache
  83. <br>Fire up psql and do the encoding as per the table:-
  84. <br>Table 5-2. Postgres Client/Server Character Set Encodings
  85. <p>Server Encoding Available Client Encodings
  86. <br>EUC_JP EUC_JP, SJIS
  87. <br>EUC_TW EUC_TW, BIG5
  88. <br>LATIN2 LATIN2, WIN1250
  89. <br>LATIN5 LATIN5, WIN, ALT
  90. <br>MULE_INTERNAL EUC_JP, SJIS, EUC_KR, EUC_CN, EUC_TW, BIG5, LATIN1 to LATIN5, WIN, ALT, WIN1250
  91. <p>Create the dataset from admin.pl, now the Japanese shows up in multibyte encoding
  92. <p>Now you can write in Hiragana, Katakana, Kanji and English
  93. <p><li><h4>Error posting a check/receipt</h4>
  94. <pre>
  95. DBD::Pg::db do failed: ERROR: syntax error at or near "," at character 114
  96. Error!
  97. INSERT INTO acc_trans (trans_id, chart_id, transdate,amount)
  98. VALUES (13314, , '03-22-2005',1.00 * 1)
  99. ERROR: syntax error at or near "," at character 114 </pre>
  100. This error is caused by a transaction which does not have links to
  101. an AR/AP account.
  102. <br>set up your chart of accounts properly and create at least one
  103. AR and AP account. Then edit all your transactions and repost.
  104. <p><li><h4>SELinux</h4>
  105. <a href=http://fedora.redhat.com/docs/selinux-faq-fc3/index.html>http://fedora.redhat.com/docs/selinux-faq-fc3/index.html</a>
  106. <p>modify /etc/selinux/conf and set SELINUX=permissive
  107. <p>use audit2allow and add the following to policy.conf,
  108. then run "make reload"
  109. <p>#line 83
  110. <br>allow httpd_sys_script_t port_type:{ tcp_socket udp_socket } { send_msg
  111. recv_msg };
  112. <br>allow httpd_sys_script_t sysctl_kernel_t:dir search;
  113. <br>allow httpd_sys_script_t sysctl_t:dir search;
  114. <br>allow httpd_sys_script_t tmp_t:sock_file write;
  115. <br>allow httpd_sys_script_t httpd_sys_content_t:lnk_file read;
  116. <br>allow httpd_sys_script_t sysctl_kernel_t:file read;
  117. <br>allow httpd_sys_script_t unconfined_t:unix_stream_socket connectto;
  118. <p><li><h4>session timeouts</h4>
  119. If you get frequent timeouts or can't even log in synchronize
  120. the clocks from the server and workstation.
  121. <p><li><h4>lineitems not printing</h4>
  122. Templates designed on a UNIX platform don't work on a DOS platform.
  123. To make them work load the template either with the builtin template editor
  124. or a text editor and save. Templates designed on a Windows platform have the
  125. same problem and won't work on a UNIX platform. Once you strip the ^M's
  126. the'll work just fine.
  127. <p><li><h4>UTF-8 character encoding</h4>
  128. Most of the translations are in ISO format. To convert the translations
  129. change directory to locale/cc and convert the files with iconv to UTF-8.
  130. You should also convert the COAs too and make sure you select UTF-8
  131. encoding when you set up a new dataset.
  132. <p><li><h4>characterset problems</h4>
  133. If you have problems displaying the correct characterset try adding
  134. <pre>
  135. AddDefaultCharset On</pre>
  136. in your httpd.conf file.
  137. <p><li><h4>About installation</h4>
  138. The easiest is to use the setup.pl script as root.
  139. You don't need to know very much about your system, just login as root,
  140. run 'perl setup.pl' and follow the prompts.
  141. <p>setup.pl does not check for missing software packages and it is your
  142. responsibilite to make sure you have the required software
  143. installed either from source or from a package.
  144. <p>Requirements are clearly indicated in the README file and on the
  145. download page.
  146. <p><li><h4>cannot create function</h4>
  147. <ol>
  148. <li>either run createlang and install the plpgsql language handler or
  149. install yourself. For more information how to do that, visit
  150. <a href=http://www.postgresql.org/docs/>PostgreSQL</a> and
  151. read the interactive documentation for procedural languages.
  152. <li>load admin.pl
  153. <li>unlock the system
  154. <li>login
  155. </ol>
  156. <p><li><h4>The requested URL /sql-ledger/admin.pl was not found</h4>
  157. Your webserver doesn't know where to find the script. Most commonly this
  158. is from distributions hiding webserver configuration files in different
  159. locations or files and setup.pl wasn't able to configure the location for
  160. you. Find out which file (httpd.conf, httpdcommon.conf, ...)
  161. controls your webserver configuration and add
  162. <pre>
  163. # SQL-Ledger
  164. Include /etc/httpd/sql-ledger-httpd.conf</pre>
  165. Create a file 'sql-ledger-httpd.conf' in /etc/httpd and copy the next part
  166. into the file.
  167. <pre>
  168. AddHandler cgi-script .pl
  169. AddDefaultCharset On
  170. Alias /sql-ledger /var/www/sql-ledger/
  171. &lt;Directory /var/www/sql-ledger&gt;
  172. Options ExecCGI Includes FollowSymlinks
  173. &lt;/Directory&gt;
  174. &lt;Directory /var/www/sql-ledger/users&gt;
  175. Order Deny,Allow
  176. Deny from All
  177. &lt;/Directory&gt;</pre>
  178. replace '/etc/httpd' and '/var/www' with the appropriate directories.
  179. <p><li><h4>users/members : Permission denied</h4>
  180. Your webserver must have write access to the users directory.
  181. If your server runs as user/group 'apache:apache' then set the
  182. users directory to owner/group apache:apache.
  183. <pre>
  184. # chown -R apache:apache users</pre>
  185. <p><li><h4>Dataset newer than version</h4>
  186. You are trying to use an older version with a dataset which was
  187. created with a newer version.
  188. <p><li><h4>PDF option not working</h4>
  189. Check if you have latex and pdflatex installed.
  190. <p><li><h4>Apache 2.0 "error 500"</h4>
  191. Some of the early versions of Apache 2.0 (< patchlevel 44) had a rewrite engine
  192. which decoded escaped strings. This created a lot of problems and I worked
  193. around it by escaping strings twice.
  194. If you get a server 500 error 'filename too long' or if collapsed menus
  195. don't expand you may have to adjusted the following code in
  196. SL/Form.pm and change the number (44) on line 84.
  197. <pre>
  198. # for Apache 2 we escape strings twice
  199. if (($ENV{SERVER_SIGNATURE} =~ /Apache\/2\.(\d+)\.(\d+)/) && !$beenthere) {
  200. $str = $self->escape($str, 1) if $2 < 44;
  201. }</pre>
  202. <p><li><h4>IDENT Authentication failed for user "sql-ledger"</h4>
  203. Edit pg_hba.conf and change authentication to
  204. <pre>
  205. local all all trust</pre>
  206. The file is in the 'data' directory of your postgresql installation.
  207. This is different with every distribution so look for it.
  208. <pre>
  209. # find / -name 'pg_hba.conf'</pre>
  210. <p>Some people can't read and seem to think 'localhost' is just some
  211. fancy word for a local machine.
  212. 'localhost' is a host like any other host on a network.
  213. A 'local' entry in pg_hba.conf will allow socket connections ONLY and
  214. not allow a host connection. If you then try to connect to 'localhost'
  215. postgres will come back with an authentication error.
  216. <p>So, forget you ever heard there is such a thing as 'localhost' and leave
  217. the Host portion blank.
  218. <p><b>WARNING!</b> DO NOT just put a 'host all all trust' in pg_hba.conf
  219. unless you know what you are doing.
  220. <p><li><h4>DBD-Pg for Mandrake 9.0</h4>
  221. Mandrake did not package a compiled DBD-Pg package again, so install DBD-Pg
  222. from the source package.
  223. Install perl-DBD-Pg-1.01-4mdk.i586.rpm from the 'contrib' area.
  224. (Mandrake / 9.0 / contrib / RPMS)
  225. <p><li><h4>LaTeX error</h4>
  226. If for some reason LaTeX produces an error message check for strange
  227. characters in your account description and parts description
  228. and use \usepackage[latin1]{inputenc} in the preamble.
  229. <p><li><h4>LaTeX templates</h4>
  230. If you don't want to edit tex code by hand,
  231. you could use Lyx, Abiword, or any WYSIWYG editor capable of exporting
  232. latex code.
  233. To do that you must change the tokens for the variables <% and %> to something
  234. like << and >>. % is the comment character in tex. There is also a
  235. pagebreak block which must be commented out.
  236. When you are done with the changes
  237. replace << and >> with <% and %> and uncomment the pagebreak block.
  238. <p>LaTeX is difficult but it also offers a much superior environment
  239. to produce professionally looking forms in postscript and PDF format.
  240. Unfortunately with all that power there is also a steep learning curve.
  241. <p><li><h4>W3M</h4>
  242. pass terminal=mozilla when you start w3m
  243. <pre>
  244. $ w3m -F http://localhost/sql-ledger/login.pl?terminal=mozilla</pre>
  245. To use without frames
  246. <pre>
  247. $ w3m http://localhost/sql-ledger/login.pl?terminal=lynx</pre>
  248. <p><li><h4>PDF option disappeared</h4>
  249. Edit ledger-smb.conf and set $latex = 1;
  250. <br>ledger-smb.conf is perl code, check if it compiles, if it does not,
  251. the internal defaults are used which turn off $latex, hence no PDF option.
  252. <p><li><h4>Installation on Windows (WIN32)</h4>
  253. <ul>
  254. <li>install Apache, perl,
  255. <a href=http://techdocs.postgresql.org/guides/InstallingOnWindows>Postgres</a>
  256. or Oracle, DBI and the appropriate DBD
  257. module
  258. <br>if you can't compile DBD-Pg here is a precompiled
  259. <a href=http://www.edmund-mergl.de/export/>DBD-Pg module</a>
  260. <li>download the latest version of <a href=/cgi-bin/nav.pl?page=source/index.html&title=Download>SQL-Ledger</a>
  261. <li>extract the files to c:\apache\sql-ledger
  262. <li>run 'perl shebang' to change the first line of the scripts. If perl
  263. is not in c:\perl\bin' change '#!c:\\perl\\bin\\perl' to the location where
  264. your perl binary is.
  265. <li>edit c:\apache\conf\httpd.conf and add
  266. <pre>
  267. Alias /sql-ledger "c:/apache/sql-ledger/"
  268. &lt;Directory "c:/apache/sql-ledger"&gt;
  269. AllowOverride All
  270. AddHandler cgi-script .pl
  271. AddDefaultCharset On
  272. Options +ExecCGI
  273. Order Allow,Deny
  274. Allow from All
  275. &lt;/Directory&gt;
  276. &lt;Directory "c:/apache/sql-ledger/users"&gt;
  277. Order Deny,Allow
  278. Deny from All
  279. &lt;/Directory&gt;
  280. </pre>
  281. <li>start Apache
  282. <li>start Postgres|Oracle|DB2
  283. <li>connect to http://localhost/sql-ledger/admin.pl and set up users
  284. and datasets
  285. <li>connect to http://localhost/sql-ledger/login.pl and login
  286. </ul>
  287. <p><li><h4>Installation on Windows /w cygwin</h4>
  288. <ul>
  289. <li>install <a href=http://sources.redhat.com/cygwin/>cygwin</a>
  290. Apache, perl, postgres, gcc and lynx
  291. <li>install <a href=http://search.cpan.org/search?module=DBI>DBI</a>
  292. <li>tar zxvf DBI-1.30.tar.gz
  293. <li>cd DBI-1.30
  294. <li>perl Makefile.PL
  295. <li>make install
  296. <li>install <a href=http://search.cpan.org/search?dist=DBD-Pg>DBD-Pg</a>
  297. <li>tar -zxvf DBD-Pg-1.13.tar.gz
  298. <li>export POSTGRES_INCLUDE=/usr/include/postgresql
  299. <li>export POSTGRES_LIB=/usr/lib/postgresql
  300. <li>cd DBD-Pg-1.13
  301. <li>perl Makefile.PL
  302. <li>make install
  303. <li>edit /etc/apache/httpd.conf and add
  304. <pre>
  305. AddHandler cgi-script .pl
  306. AddDefaultCharset On
  307. Alias /sql-ledger /var/www/sql-ledger/
  308. &lt;Directory /var/www/sql-ledger&gt;
  309. Options +ExecCGI
  310. &lt;/Directory&gt;
  311. &lt;Directory /var/www/sql-ledger/users&gt;
  312. Order Deny,Allow
  313. Deny from All
  314. &lt/Directory&gt;
  315. </pre>
  316. <li>install SQL-Ledger
  317. <li>cd /var/www
  318. <li>mkdir sql-ledger
  319. <li>download <a href=/cgi-bin/download.pl?setup.pl>setup.pl</a> and save the file
  320. in /var/www/sql-ledger
  321. <li>cd /var/www/sql-ledger
  322. <li>perl setup.pl
  323. </ul>
  324. <p><li><h4>What do I enter for the language</h4>
  325. If you use English, nothing, if you want to use a foreign language for
  326. the login screen and admin stuff enter the language code, this is the
  327. directory in the locale directory.
  328. <p><li><h4>printing to a printer</h4>
  329. Printers are defined in ledger-smb.conf
  330. <pre>
  331. %printer = ( 'Default' => 'lpr', 'Color' => 'lpr -PEpson' );</pre>
  332. Check in your /etc/printcap file for the names of available printers.
  333. <p>If you have LaTeX installed set
  334. <pre>
  335. $latex = 1</pre> in ledger-smb.conf
  336. <p>To send the document to the printer check the "Postscript" or "PDF" format,
  337. enter the number of copies and click on the "Print" button.
  338. <p>The printer you enter in your preferences is the default printer.
  339. You can choose any other available printer. This makes it possible
  340. to print from anywhere on the network to any printer.
  341. <p>Note: html format is for screen preview. Use the "Print" option from your
  342. browser to print to a printer.
  343. <p><li><h4>Using samba to send printjobs to a printer attached to a Windows XP workstation</h4>
  344. The next part applies to roll your own print filters only. If you use CUPS or
  345. LPRng your milage may vary but you can still use this as a guide how it works.
  346. I use the printer 'Epson' as an example which is
  347. attached to a XP workstation called Raven.
  348. <pre>
  349. /etc/printcap entry on the server which runs lpd
  350. epson:Epson\
  351. :sh:\
  352. :lp=/dev/null:\
  353. :sd=/var/spool/output/epson:\
  354. :if=/usr/libexec/lpr/epson/prnfilter:\
  355. # end of entry in /etc/printcap
  356. # prnfilter shell script
  357. #!/bin/sh
  358. # Filter for Epson Stylus
  359. PATH="$PATH:/usr/local/bin"
  360. #read first_line
  361. read tmp
  362. first_line=`echo $tmp | cut -b1-2 | sed -n '1p'`
  363. first_chr=`expr "$first_line" : '\(.\)'`
  364. first_two=`expr "$first_line" : '\(..\)'`
  365. rewindstdin
  366. if [ "$first_two" = "%!" ]; then # Postscript file
  367. gs @st640p.upp -dSAFER -dNOPAUSE -q -sOutputFile=/tmp/$$ -
  368. else
  369. # text file
  370. cat &gt; /tmp/$$
  371. echo -n "^L" &gt;&gt; /tmp/$$
  372. smbclient '\\Raven\Epson' "" -c 'printmode text'
  373. fi
  374. smbclient '\\Raven\Epson' "" -P -c "print /tmp/$$"
  375. rm /tmp/$$
  376. # EOF
  377. rewindstdin is a small program to rewind the filehandle for STDIN
  378. save the next part up to EOF to a file rewindstdin.c and compile
  379. #include &lt;sys/types.h&gt;
  380. #include &lt;unistd.h&gt;
  381. extern int errno;
  382. main()
  383. {
  384. if( lseek(0,0,0) == 0 ){
  385. errno = 0;
  386. }
  387. return( errno );
  388. }
  389. # EOF
  390. compile to an executable
  391. gcc -o /usr/local/bin/rewindstdin rewindstdin.c
  392. </pre>
  393. <p><li><h4>beginning balances</h4>
  394. Add a GL Journal entry and enter the beginning balance for your accounts.
  395. Beginning balances are the balances from your last balance sheet. If you also
  396. add open invoices to account for COGS for inventory, add the invoices
  397. and make the appropriate adjustments.
  398. <p><li><h4>establish a beginning inventory</h4>
  399. add the parts with a vendor invoice. Use the <b>real cost</b> for the items,
  400. not zero. If you use zero cost then the cost of goods will be zero when you
  401. sell the item.
  402. <p><li><h4>Assemblies</h4>
  403. Assemblies are manufactured goods assembled from parts, services and
  404. assemblies. Because you do not buy assemblies you 'stock assemblies' by
  405. adding assembled units to your inventory. The quantity for individual parts
  406. is reduced and the quantity for the assembly increased. To disassemble an
  407. assembly you simply return the parts to inventory by entering a negative
  408. quantity for the number of assemblies to stock.
  409. <p><li><h4>customizing SQL-Ledger</h4>
  410. The <a href=/cgi-bin/nav.pl?page=feature/api.html&title=Application%20Interface>application interface</a>
  411. consists of a global and private interface.
  412. <p><li><h4>DBD-Pg not installed</h4>
  413. Most modern distributions now package DBD-Pg. If it is
  414. not packaged follow this recipe to get it working.
  415. <ul>
  416. <li>check if you have the header files for PostgreSQL
  417. <br>$ find / -name 'libpq-fe.h'
  418. <br>if nothing shows up install the development package for PostgreSQL
  419. <li>download and untar DBD-Pg
  420. <li>set the environment variables POSTGRES_LIB and POSTGRES_INCLUDE
  421. <li>cd to DBD-Pg directory
  422. <br>as ordinary user
  423. <br>$ perl Makefile.PL
  424. <br>$ make
  425. <br>$ make test
  426. <br>if all went well su to root
  427. <br># make install
  428. <li>remove DBD-Pg
  429. </ul>
  430. <p><li><h4>login.pl has compilation error</h4>
  431. This could be because of a missing configuration file in the users directory
  432. <p>check the permission for the users directory. The directory must be
  433. set writeable for the webserver. If your webserver runs ias user/group
  434. nobody.nogroup set the directory to
  435. <pre>
  436. drwx--x--x 2 nobody nogroup 1024 May 26 16:49 users
  437. or
  438. drwxrwx--x 2 johndoe nogroup 1024 May 26 16:49 users</pre>
  439. <p><li><h4>script not executing, shows in browser instead</h4>
  440. Add
  441. <pre>
  442. AddHandler cgi-script .pl</pre>
  443. in your httpd.conf file.
  444. <p><li><h4>unknown terminal!</h4>
  445. the frontend script couldn't figure out which browser you are using
  446. <p>include the terminal variable on the URL
  447. <pre>
  448. http://localhost/sql-ledger/login.pl?terminal=lynx</pre>
  449. Valid terminal variables are lynx, mozilla and js
  450. <p><li><h4>permission denied</h4>
  451. Check if your web server has write permission to write to the following
  452. files and directories:
  453. <pre>
  454. users/
  455. templates/
  456. users/members
  457. # chown nobody:nogroup users templates users/members
  458. </pre>
  459. <p><li><h4>permission denied to access tables</h4>
  460. The user you entered in the "Database section" must be a valid
  461. database user who has rights to access the tables.
  462. <p>If the tables are owned by 'joe' and you enter 'mary' as the dba
  463. you might run into this problem if mary doesn't have the rights to
  464. access tables owned by joe.
  465. <p><li><h4>html and graphics files don't show up on screen</h4>
  466. Enable Includes and FollowSymlinks Options in your httpd.conf file
  467. <pre>
  468. &lt;Directory /usr/local/sql-ledger&gt;
  469. Options ExecCGI Includes FollowSymlinks
  470. &lt;/Directory&gt;
  471. </pre>
  472. <p><li><h4>switch display to a foreign language</h4>
  473. Load your preferences and select the language.
  474. <br>Language selection is in accordance to
  475. <a href=http://www.unece.org/cefact/locode/service/main.htm>
  476. ISO 3166-1</a> standards.
  477. <p><li><h4>Text shows in English when I use a foreign language</h4>
  478. This is because the corresponding hash entry is missing.
  479. Add the missing text in the locale/cc/all or locale/cc/missing
  480. file and run 'perl locales.pl' from the command line to rebuild
  481. the individual files.
  482. <br>cc refers to the country code.
  483. <p><li><h4>switch to a foreign language for the login and admin screen</h4>
  484. Edit ledger-smb.conf and enter the code for the $language variable
  485. <pre>
  486. $language = "de";</pre>
  487. <p>This is a global change and applies to all logins, individual settings
  488. may be changed by setting the language in your Preferences.
  489. </ul>
  490. <p>
  491. <hr>
  492. <a name=security>
  493. <h1>LedgerSMB security</h1>
  494. </a>
  495. <ul>
  496. <li>The security features built into LedgerSMB provide encrypted passwords
  497. and access control which makes it fairly safe out of the box to run even in
  498. front of a firewall.
  499. Some precautions which are out of our control must be taken though.
  500. It matters where you install SL and how you configure your web server and
  501. SQL server.
  502. <pre>
  503. Typical setups:
  504. /usr/local/vh/www <- DocumentRoot for virtual host
  505. /usr/local/vh/sql-ledger <- Alias for sql-ledger
  506. /usr/local/vh/users <- users directory out of reach
  507. <hr width=60% align=left>
  508. /usr/local/vh/www <- DocumentRoot for virtual host
  509. /usr/local/vh/www/sql-ledger <- Alias for sql-ledger
  510. /usr/local/vh/www/sql-ledger/users <- users configuration files and tmp space
  511. &lt;Directory /usr/local/vh/www/sql-ledger/users&gt; <- disable webserver access
  512. Order Deny,Allow for users directory
  513. Deny from All
  514. &lt;/Directory&gt;
  515. </pre>
  516. The location for the users directory can be specified in ledger-smb.conf
  517. <p><li>Set permission for the users and templates directory to 711
  518. <p><li>If you do not want anyone to change the templates with the built-in
  519. editor set the files in templates/directory/ to read only or disable
  520. the menu item to edit the templates.
  521. <p><li>You can set up a read-only environment if you disable the menu items
  522. to add data. i.e 'Add Transaction' if unchecked you will not be able to add
  523. a transaction or repost a transaction. You may look at it but nothing else.
  524. <p><li>There are various settings for audit control and you may disable
  525. reposting entirely or up to a certain date. And with the audit trail enabled
  526. you can keep tab of who is doing what.
  527. <p><li>For PostgreSQL you may also set who has access to the server in the file
  528. pg_hba.conf
  529. <br>Authentication crypt does not work because not all SQL servers
  530. accept encrypted passwords.
  531. <p><li>in addition you can secure the tables from unauthorized access by
  532. setting up a different database user and GRANT rights. For instance,
  533. users without DELETE rights will still be able to use the program, change
  534. customers and vendors, add transactions but will not be able to delete or
  535. repost transactions.
  536. <br>To lock all the tables to create a RO system GRANT SELECT rights only.
  537. <p><li>Other security options include a secure shell, your webserver's
  538. authentication system, SSL, encrypted tunnels, ...
  539. </ul>
  540. </BODY>
  541. </HTML>