Description of problem: ews-2.1 contained default DAVLockDB configuration in httpd.conf: <IfModule mod_dav_fs.c> # Location of the WebDAV lock database. DAVLockDB /var/lib/dav/lockdb </IfModule> However such/similar configuration is missing in jws-3.0.0-DR0.1 There is conf.modules.d/00-dav.conf, but it only contains loading of the modules, without any configuration: LoadModule dav_module modules/mod_dav.so LoadModule dav_fs_module modules/mod_dav_fs.so LoadModule dav_lock_module modules/mod_dav_lock.so Please add appropriate DAVLockDB configuration.
This should be set outside of OS directories if its possible: We have it in EWS 2.1 Solaris: DAVLockDB run/davlockdb Windows: DAVLockDB run/lockdb We should unified this settings in JWS 30 for all platfroms, for example to: DAVLockDB run/davlockdb
fix for rpm: [weli@dhcp-66-78-87 httpd24-el7]$ git diff diff --git a/00-dav.conf b/00-dav.conf index e6af8de..d36f2c8 100644 --- a/00-dav.conf +++ b/00-dav.conf @@ -1,3 +1,9 @@ LoadModule dav_module modules/mod_dav.so LoadModule dav_fs_module modules/mod_dav_fs.so LoadModule dav_lock_module modules/mod_dav_lock.so + +<IfModule mod_dav_fs.c> + # Location of the WebDAV lock database. + DAVLockDB /var/lib/dav/lockdb +</IfModule> +
verification: [weli@dhcp-66-78-87 sbin]$ ./apachectl -M | grep dav dav_module (shared) dav_fs_module (shared) dav_lock_module (shared) example config for testing: Alias /davfoo /home/weli/projs/usr/share/java/jbossas-fordev/jws-3.0/httpd/www/davfoo <Location /davfoo> DAV On </Location> testing: [weli@dhcp-66-78-87 cadaver-0.23.3]$ cadaver http://localhost/davfoo dav:/davfoo/> ls Listing collection `/davfoo/': collection is empty. dav:/davfoo/>
# rpm mod_dav fix revised # ## fix ## [weli@dhcp-66-78-87 httpd24-jws3-el7]$ git diff diff --git a/00-dav.conf b/00-dav.conf index e6af8de..9c5af8c 100644 --- a/00-dav.conf +++ b/00-dav.conf @@ -1,3 +1,8 @@ LoadModule dav_module modules/mod_dav.so LoadModule dav_fs_module modules/mod_dav_fs.so LoadModule dav_lock_module modules/mod_dav_lock.so + +<IfModule mod_dav_fs.c> + # Location of the WebDAV lock database. + DAVLockDB /var/lib/dav/lockdb +</IfModule> diff --git a/httpd.spec b/httpd.spec index ab1c928..fd4dac9 100644 --- a/httpd.spec +++ b/httpd.spec @@ -416,7 +416,7 @@ install -m 644 $RPM_SOURCE_DIR/httpd.sysconf \ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/httpd%{jws} # for holding mod_dav lock database -mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav%{jws} # create a prototype session cache mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/mod_ssl%{jws} @@ -480,6 +480,8 @@ for f in 00-base.conf 00-mpm.conf 01-cgi.conf 00-dav.conf \ $RPM_BUILD_ROOT%{_sysconfdir}/httpd%{jws}/conf.modules.d/$f done +sed -i -e 's:/var/lib/dav/lockdb:/var/lib/dav%{jws}/lockdb:' $RPM_BUILD_ROOT%{_sysconfdir}/httpd%{jws}/conf.modules.d/00-dav. + for f in welcome.conf ssl.conf manual.conf userdir.conf; do install -m 644 -p $RPM_SOURCE_DIR/$f \ $RPM_BUILD_ROOT%{_sysconfdir}/httpd%{jws}/conf.d/$f ## 00-dav.conf for testing ## LoadModule dav_module modules/mod_dav.so LoadModule dav_fs_module modules/mod_dav_fs.so LoadModule dav_lock_module modules/mod_dav_lock.so <IfModule mod_dav_fs.c> # Location of the WebDAV lock database. DAVLockDB /var/lib/dav24/lockdb </IfModule> Alias /davfoo /home/weli/projs/usr/share/java/jbossas-fordev/jws-3.0/httpd/w\ ww/davfoo <Location /davfoo> DAV On </Location> <Directory /davfoo> Options Indexes MultiViews Require all granted </Directory> ## permissions ## [weli@dhcp-66-78-87 lib]$ ls -ld dav24 drwx------. 2 apache apache 4096 Jan 7 22:49 dav24 [weli@dhcp-66-78-87 lib]$ pwd /var/lib [weli@dhcp-66-78-87 httpd]$ cd www [weli@dhcp-66-78-87 www]$ ls -ld davfoo drwxr-xr-x. 2 apache weli 4096 Jan 7 22:49 davfoo [weli@dhcp-66-78-87 www]$ pwd /home/weli/projs/usr/share/java/jbossas-fordev/jws-3.0/httpd/www ## testing ## dav:/davfoo/> get bar Enter local filename for `/davfoo/bar': bar2 Downloading `/davfoo/bar' to bar2: [.] succeeded. dav:/davfoo/> put bar2 Uploading bar2 to `/davfoo/bar2': succeeded. dav:/davfoo/> ls Listing collection `/davfoo/': succeeded. bar 0 Jan 7 22:44 bar2 0 Jan 7 22:49
Hi Michal, for zip fix, let's put lockdb to: jws-3.0/httpd/var/lib/dav24/lockdb is that okay?
Weinan, that sounds good. However, do we want to use 'dav24', or only 'dav'? Just asking...
(In reply to Michal Haško from comment #6) > Weinan, > > that sounds good. However, do we want to use 'dav24', or only 'dav'? Just > asking... Seems meaningless to use 'dav24' for zip bundle :-) For rpm installation we use 'dav24' to separate it from base rhel httpd installation. Let me change it to 'dav' in zip bundle then. I'll provide fix tomorrow daytime.
There is a problem with permissions for WebDav lockdb like you wrote in email. I suggest to use the same configuration for RHEL RPM and ZIP. /var/lib/dav%{jws}/lockdb
We should create user apache and group apache if its not already created in .postinstall then chown apache:apache on dav24 directory. BTW We have apache user and group creation in EWS 2.1 .postinstall for Solaris.
(In reply to Libor Fuka from comment #8) > There is a problem with permissions for WebDav lockdb like you wrote in > email. > I suggest to use the same configuration for RHEL RPM and ZIP. > > /var/lib/dav%{jws}/lockdb Okay, then postinstall will help customers to create this directory.
(In reply to Libor Fuka from comment #9) > We should create user apache and group apache if its not already created in > .postinstall then chown apache:apache on dav24 directory. > BTW We have apache user and group creation in EWS 2.1 .postinstall for > Solaris. Good to know :-) Let me add this into postinstall. First .postinstall should check whether apache:apache exists in system, if not it will create them.
fix for zip: [weli@dhcp-66-78-87 jws-compose]$ git diff diff --git a/postinstall b/postinstall index 7fe6422..ca0abe4 100644 --- a/postinstall +++ b/postinstall @@ -59,4 +59,11 @@ sed -i -e "s:/usr/share/httpd/noindex/index.html:${currentDir}/www/error/noindex sed -i -e "s:my \$installbuilddir = \$libdir \. \"/httpd/build\":my \$installbuilddir = \"${currentDir # bz1176804 httpd: could not log pid to file /run/httpd/httpd.pid -echo "PidFile ${currentDir}/run/httpd.pid" >> conf.d/00-mpm.conf \ No newline at end of file +echo "PidFile ${currentDir}/run/httpd.pid" >> conf.d/00-mpm.conf + +# bz1178816 +/usr/sbin/useradd -c "Apache" -u 48 \ + -s /sbin/nologin -r -d ${currentDir} apache 2> /dev/null +dav_lockdb_dir='/var/lib/dav24' +mkdir -p ${dav_lockdb_dir} 2> /dev/null +chown apache ${dav_lockdb_dir} 2> /dev/null verification: [weli@dhcp-66-78-87 sbin]$ cadaver http://localhost/davfoo dav:/davfoo/> ls Listing collection `/davfoo/': succeeded. bar 0 Jan 7 22:44 bar2 0 Jan 7 22:49 bar3 0 Jan 7 23:39 dav:/davfoo/> get bar3 Downloading `/davfoo/bar3' to bar3: [.] succeeded. dav:/davfoo/> put bar3 Uploading bar3 to `/davfoo/bar3': succeeded. dav:/davfoo/> quit Connection to `localhost' closed. [weli@dhcp-66-78-87 sbin]$ sudo ls -ld /var/lib/dav24 drwx------. 2 apache root 4096 Jan 9 15:50 /var/lib/dav24 [weli@dhcp-66-78-87 sbin]$ sudo ls -l /var/lib/dav24 total 0 -rw-r--r--. 1 apache apache 0 Jan 9 15:50 lockdb.dir -rw-r--r--. 1 apache apache 0 Jan 9 15:50 lockdb.pag
Verified with DR1