
simon.loewenthal at tele2
Sep 21, 2011, 6:50 AM
Post #4 of 11
(572 views)
Permalink
|
|
Re: Now: postgresql set-up Was: davical on mysql
[In reply to]
|
|
On 09/21/2011 02:44 PM, Simon Loewenthal/NL/Tele2 wrote: > On 09/21/2011 02:22 PM, Simon Loewenthal/NL/Tele2 wrote: >> On 09/21/2011 11:19 AM, Simon Loewenthal/NL/Tele2 wrote: >>> On 09/21/2011 10:21 AM, Simon Loewenthal/NL/Tele2 wrote: >>>> On 09/21/2011 09:52 AM, Simon Loewenthal/NL/Tele2 wrote: >>>>> On 09/21/2011 01:14 AM, Andrew McMillan wrote: >>>>>> On Tue, 2011-09-20 at 16:41 +0200, Simon Loewenthal/NL/Tele2 wrote: >>>>>>> OK, I shall relent on the mySQL requirement. We did not want to support >>>>>>> another sql database :( >>>>>>> >>>>>>> I installed the debian package davical. The files are under >>>>>>> /usr/share/davical. >>>>>>> Symbolic links are disallowed in apache configurations. All content is >>>>>>> placed in /web/.... (mounted noexec,nosetuid), and all cgi-bin is in >>>>>>> another filesystem with exec allowed. >>>>>> You don't need exec on the PHP code for DAViCal. It should all be >>>>>> owner/group root, mode 644 so the simplest (and recommended) solution is >>>>>> just to point the DocumentRoot at /usr/share/davical/htdocs. There is >>>>>> no reason why anything should modify those files other than a version >>>>>> upgrade. DAViCal does not write data to the filesystem. >>>>>> >>>>>> >>>>>>> Can I simply copy the entire /usr/share/davical into /web/davical/ and >>>>>>> run the scripts (e.g dba/create-database.sh) from there? >>>>>> You could probably do that also (you'd also need to copy the AWL tree >>>>>> similarly), and you probably also want to make sure that nothing in the >>>>>> webserver has access to the non-web content of the tree, such as the >>>>>> directories containing include files, scripts, etc, etc. >>>>>> >>>>>> So setting it up securely in that location will take some extra care, >>>>>> but it sounds like you're probably paranoid enough to do an OK job. >>>>>> >>>>>> Cheers, >>>>>> Andrew. >>>>>> >>>>> Hi Andrew, >>>>> >>>>> Then perhaps this: >>>>> >>>>> Move /usr/share/davical/htdocs to /web/static/davical/htdocs >>>>> Leave the rest of davical where it is in /usr/share/davical >>>>> >>>>> Which gives >>>>> # ls /usr/share/davical/ >>>>> dba htdocs inc locale >>>>> >>>>> # ls /www/roundcube/davical/ >>>>> htdocs >>>>> >>>>> * vhost >>>>> Alias /images/ /web/static/davical/htdocs/images/ >>>>> <Directory /web/static/davical/davical/htdocs/> >>>>> and the php settings etc., >>>>> >>>>> I imagine that I would have to modify some of the davical scripts for >>>>> this... Did I overlook something? >>>>> >>>>> Cheers, s >>>> I think that this looks ok. >>>> >>>> # pwd >>>> /usr/share/davical >>>> # find -exec grep share \{\} \; >>>> , '/usr/share/awl/inc' // Where it ends up on Debian >>>> , '/usr/share/php/awl/inc' // Fedora's standard for PHP libraries >>>> , '/usr/local/share/awl/inc' >>>> # # php_value include_path /usr/share/awl/inc >>>> , '/usr/share/awl/inc' // Where it ends up on Debian >>>> , '/usr/share/php/awl/inc' // Fedora's standard for PHP libraries >>>> , '/usr/local/share/awl/inc' >>>> AWLDIR="/usr/share/awl" >>>> AWLDIR="/usr/local/share/awl" >>>> Thanks for trying DAViCal! Check in /usr/share/doc/davical/examples/ for >>>> -- RAISE NOTICE 'Permissions to shared group % ', out_confers; >>>> -- RAISE NOTICE 'Permissions to shared group'; >>>> -- RAISE NOTICE 'Permissions to shared group % ', out_confers; >>>> -- RAISE NOTICE 'Permissions to shared group % ', out_confers; >>>> -- RAISE NOTICE 'Permissions to shared group'; >>>> -- RAISE NOTICE 'Permissions to shared group % ', out_confers; >>>> -- RAISE NOTICE 'Permissions to shared group'; >>>> # # php_value include_path /usr/share/awl/inc >>>> , '/usr/share/awl/inc' // Where it ends up on Debian >>>> , '/usr/share/php/awl/inc' // Fedora's standard for PHP libraries >>>> , '/usr/local/share/awl/inc' >>> or maybe not. The create-database.sh seems to have run well, but I >>> suspect that it set something in the htdocs dir, which of course is in >>> the wrong place as far as it is concerned, because hitting the htdocs on >>> the web server serves a blank page. >>> >>> >>> # su postgres -c ./dba/create-database.sh >>> >>> Supported locales updated. >>> Updated view: dav_principal.sql applied. >>> CalDAV functions updated. >>> RRULE functions updated. >>> Database permissions updated. >>> NOTE >>> ==== >>> * You will need to edit the PostgreSQL pg_hba.conf to allow the >>> 'davical_dba' database user access to the 'davical' database. >>> >>> * You will need to edit the PostgreSQL pg_hba.conf to allow the >>> 'davical_app' database user access to the 'davical' database. >>> >>> * The password for the 'admin' user has been set to 'nnnnnnnn' >>> >>> Thanks for trying DAViCal! Check in /usr/share/doc/davical/examples/ for >>> some configuration examples. For help, visit #davical on irc.oftc.net. >>> >>> So, what I want to achieve, might want a little more tweaking:- >>> >>> htdocs only in the apache document root. >>> The rest in /usr/share/ >>> >>> The current apache vhost is: >>> DirectoryIndex index.php index.html >>> Alias /images/ /web/static/davical/htdocs/images/ >>> <Directory /web/static/davical/htdocs/> >>> AllowOverride None >>> Order allow,deny >>> Allow from all >>> </Directory> >>> AcceptPathInfo On >>> php_value include_path /usr/share/awl/inc >>> php_value magic_quotes_gpc 0 >>> php_value register_globals 0 >>> php_value error_reporting "E_ALL & ~E_NOTICE" >>> php_value default_charset "utf-8" >>> >>> >>> ---- >> This was not going to work (don't know why not) so relented again and >> used this in the vhost which gave me the setup page complaining that the >> /etc/davical/config.php is missing. No problem, I'll create one! Not so >> fast.... :- >> >> The create-database.sh script was run yesterday. After completion I >> copied and pasted the admin passwed. Now it s time to use it. I know >> the password is correct as its in a file... >> >> # psql -U admin -W >> Password for user admin: >> psql: FATAL: Ident authentication failed for user "admin" >> # psql davical -c 'select username, password from usr;' -U admin >> psql: FATAL: Ident authentication failed for user "admin" >> # psql davical -c 'select username, password from usr;' -U admin -w >> psql: FATAL: Ident authentication failed for user "admin" >> # psql davical -c 'select username, password from usr;' >> psql: FATAL: Ident authentication failed for user "root" >> >> It won't accept the admin password. >> >> Try again, but this time, contary to what the results of the >> create-database.sh wrote I shall try this: >> # psql davical -c 'select username, password from usr;' -W -U davical_app >> Password for user davical_app: ****** <--- Use the admin password! Eh? >> username | password >> ----------+------------ >> admin | **nnnnxxxx >> (1 row) >> >> i) The user admin does exist. >> ii) The user admin has the same password as the user davical_app. >> iii) The psql command does not accept the password listed for admin as >> valid for the admin user. >> Clearly, postgresql's way of doing things differs from my experience >> with mysql. >> iv) I wonder what those asterisk are for, that prefix the password entry. >> >> Would someone tell me what is going on, and how I can log in as the >> admin user? >> >> Cheers, Simon. >> >> >> > Got it to work :D What does the mean? Is it important? > Suhosin "server.strip" disabled. > > > Dependencies > > Dependency Status > Current DAViCal version Passed > DAViCal DB Schema version Passed > AWL Library version Passed > PHP PDO module available Passed > PDO PostgreSQL drivers Passed > PHP PostgreSQL available Passed > GNU gettext support Passed > PHP iconv support Passed > PHP DateTime class Passed > Suhosin "server.strip" disabled *Fail* > PHP Magic Quotes GPC off Passed > PHP Magic Quotes runtime off Passed > Cheers Vincent for the info about this. On another set-up note: 1) I created a normal user called simon [at] test Works and I can log in. However, it states that it is an administrator, and cannot access calendars, which is odd as its not an admin:- Principle type = Person Active = yes (ticked) Administrator = No (unticked) What is it missing to make it a normal user with a calendar? 2) I am trying to configure a Android phone to connect with it. It seems that the Samsung SGS9100 has the ability to sync directtly with it, but adding a "Server account" - Sync Server. The settings are: Address: https://mydomain/ical/ (if I try and add the caldev.php/simon [at] test, it fails the authentication) LoginID: simon [at] test Password: nnnnnn Additional settings are: Sync Catagory -- Contacts DBname: Calendar DBname: Memo DBname: I don't know what to add into the Calendar DBname. Is there one specific (or generic) the users? However, I expect that the option in the handset is not really for iCal but for some samsung poorly undocumented synchronization service... ;) ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Davical-general mailing list Davical-general [at] lists https://lists.sourceforge.net/lists/listinfo/davical-general
|