Re: [modwsgi] Re: mod_wsgi and mod_ruid2
Graham, Thank you very much for help! Now it is working perfect! WSGIDaemonProcess moin user=www-moin group=www-moin home=/web/moin/ processes=5 threads=10 maximum-requests=1000 umask=0007 On Friday, July 20, 2012 8:51:00 PM UTC+3, Graham Dumpleton wrote: Use: WSGIDaemonProcess moin user=www-moin group=www-moin home=/tmp processes=5 threads=10 maximum-requests=1000 umask=0007 That is, add home=/tmp argument. This will get rid of complaint about not being able to change home directory. Graham -- You received this message because you are subscribed to the Google Groups modwsgi group. To view this discussion on the web visit https://groups.google.com/d/msg/modwsgi/-/TrMPaSolOE4J. To post to this group, send email to modwsgi@googlegroups.com. To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
[modwsgi] Re: mod_wsgi and mod_ruid2
Thank you for reply! I tried: apt-get remove libapache2-mod-wsgi # /usr/local/src wget http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz tar -zxvf mod_wsgi-3.3.tar.gz cd mod_wsgi-3.3 vi mod_wsgi.c Change: #if defined(MPM_ITK) if (chown(process-socket, process-uid, -1) 0) { #else if (chown(process-socket, ap_unixd_config.user_id, -1) 0) { #endif to: / * #if defined(MPM_ITK) */ if (chown(process-socket, process-uid, -1) 0) { /* #else if (chown(process-socket, ap_unixd_config.user_id, -1) 0) { #endif */ apt-get install apache2-threaded-dev python-dev checkinstall # ./configure make # checkinstall --pkgname=mod_wsgi --pkgversion 3.3.release`date +%Y%m%d` --backup=no --install=no --defaul # dpkg -i mod-wsgi_3.3.release20120720-1_amd64.deb # a2enmod wsgi service apache2 restart And I got the errors: * Starting web server apache2 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs Action 'start' failed. The Apache error log may have more information. [Fri Jul 20 17:03:29 2012] [alert] (2)No such file or directory: mod_wsgi (pid=393): Unable to change working directory to '/home/www-moin'. [Fri Jul 20 17:03:29 2012] [alert] (2)No such file or directory: mod_wsgi (pid=395): Unable to change working directory to '/home/www-moin'. [Fri Jul 20 17:03:29 2012] [alert] (2)No such file or directory: mod_wsgi (pid=396): Unable to change working directory to '/home/www-moin'. killall apache2 service apache2 start And now srwx-- 1 www-moin root 0 Jul 20 20:08 moin.13173.0.1.sock Now it works! Great! But I can see in Apache error log: [Fri Jul 20 20:15:21 2012] [alert] (2)No such file or directory: mod_wsgi (pid=13628): Unable to change working directory to '/home/www-moin'. [Fri Jul 20 20:15:21 2012] [alert] (2)No such file or directory: mod_wsgi (pid=13629): Unable to change working directory to '/home/www-moin'. [Fri Jul 20 20:15:21 2012] [alert] (2)No such file or directory: mod_wsgi (pid=13630): Unable to change working directory to '/home/www-moin'. [Fri Jul 20 20:15:21 2012] [notice] Apache/2.2.22 (Ubuntu) DAV/2 SVN/1.6.17 PHP/5.3.10-1ubuntu3.2 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations [Fri Jul 20 20:15:21 2012] [alert] (2)No such file or directory: mod_wsgi (pid=13631): Unable to change working directory to '/home/www-moin'. [Fri Jul 20 20:15:21 2012] [alert] (2)No such file or directory: mod_wsgi (pid=13632): Unable to change working directory to '/home/www-moin'. My user was created with: useradd --shell /bin/false --no-create-home www-moin Maybe is possible to fix this ? On Friday, July 20, 2012 4:55:29 PM UTC+3, slech wrote: Hello Everyone. I have an issue to install moin wiki with mod_ruid. Moin wiki is python based app and I start it via Apache and mod_wsgi. All work fine without mod_ruid2. And also work fine if I manually change permission to the */var/run/wsgi/moin.32282.0.1.sock* file chown www-moin:www-moin /var/run/wsgi/moin.32282.0.1.sock or chmod 777 /var/run/wsgi/moin.32282.0.1.sock After restart permission changed and it looks: srwx-- 1 www-data root 0 Jul 20 16:42 moin.32282.0.1.sock My Apache config related settings: RMode config RUidGid www-moin www-moin RGroups www-moin WSGIScriptAlias /web/production/moin/wm/moin.wsgi WSGIDaemonProcess moin user=www-moin group=www-moin processes=5 threads=10 maximum-requests=1000 umask=0007 WSGIProcessGroup moin As I understand wsgi process start as Apache user (in my case www-moin) but maybe at first run(restart, reload) it starts as default Apache user ? My question is how I can change sock file default permissions ? Thanks. -- You received this message because you are subscribed to the Google Groups modwsgi group. To view this discussion on the web visit https://groups.google.com/d/msg/modwsgi/-/0an-R_sO9WAJ. To post to this group, send email to modwsgi@googlegroups.com. To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
Re: [modwsgi] Re: mod_wsgi and mod_ruid2
Use: WSGIDaemonProcess moin user=www-moin group=www-moin home=/tmp processes=5 threads=10 maximum-requests=1000 umask=0007 That is, add home=/tmp argument. This will get rid of complaint about not being able to change home directory. Graham On 20 July 2012 10:20, slech xum...@gmail.com wrote: Thank you for reply! I tried: apt-get remove libapache2-mod-wsgi # /usr/local/src wget http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz tar -zxvf mod_wsgi-3.3.tar.gz cd mod_wsgi-3.3 vi mod_wsgi.c Change: #if defined(MPM_ITK) if (chown(process-socket, process-uid, -1) 0) { #else if (chown(process-socket, ap_unixd_config.user_id, -1) 0) { #endif to: / * #if defined(MPM_ITK) */ if (chown(process-socket, process-uid, -1) 0) { /* #else if (chown(process-socket, ap_unixd_config.user_id, -1) 0) { #endif */ apt-get install apache2-threaded-dev python-dev checkinstall # ./configure make # checkinstall --pkgname=mod_wsgi --pkgversion 3.3.release`date +%Y%m%d` --backup=no --install=no --defaul # dpkg -i mod-wsgi_3.3.release20120720-1_amd64.deb # a2enmod wsgi service apache2 restart And I got the errors: * Starting web server apache2 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs Action 'start' failed. The Apache error log may have more information. [Fri Jul 20 17:03:29 2012] [alert] (2)No such file or directory: mod_wsgi (pid=393): Unable to change working directory to '/home/www-moin'. [Fri Jul 20 17:03:29 2012] [alert] (2)No such file or directory: mod_wsgi (pid=395): Unable to change working directory to '/home/www-moin'. [Fri Jul 20 17:03:29 2012] [alert] (2)No such file or directory: mod_wsgi (pid=396): Unable to change working directory to '/home/www-moin'. killall apache2 service apache2 start And now srwx-- 1 www-moin root 0 Jul 20 20:08 moin.13173.0.1.sock Now it works! Great! But I can see in Apache error log: [Fri Jul 20 20:15:21 2012] [alert] (2)No such file or directory: mod_wsgi (pid=13628): Unable to change working directory to '/home/www-moin'. [Fri Jul 20 20:15:21 2012] [alert] (2)No such file or directory: mod_wsgi (pid=13629): Unable to change working directory to '/home/www-moin'. [Fri Jul 20 20:15:21 2012] [alert] (2)No such file or directory: mod_wsgi (pid=13630): Unable to change working directory to '/home/www-moin'. [Fri Jul 20 20:15:21 2012] [notice] Apache/2.2.22 (Ubuntu) DAV/2 SVN/1.6.17 PHP/5.3.10-1ubuntu3.2 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations [Fri Jul 20 20:15:21 2012] [alert] (2)No such file or directory: mod_wsgi (pid=13631): Unable to change working directory to '/home/www-moin'. [Fri Jul 20 20:15:21 2012] [alert] (2)No such file or directory: mod_wsgi (pid=13632): Unable to change working directory to '/home/www-moin'. My user was created with: useradd --shell /bin/false --no-create-home www-moin Maybe is possible to fix this ? On Friday, July 20, 2012 4:55:29 PM UTC+3, slech wrote: Hello Everyone. I have an issue to install moin wiki with mod_ruid. Moin wiki is python based app and I start it via Apache and mod_wsgi. All work fine without mod_ruid2. And also work fine if I manually change permission to the /var/run/wsgi/moin.32282.0.1.sock file chown www-moin:www-moin /var/run/wsgi/moin.32282.0.1.sock or chmod 777 /var/run/wsgi/moin.32282.0.1.sock After restart permission changed and it looks: srwx-- 1 www-data root 0 Jul 20 16:42 moin.32282.0.1.sock My Apache config related settings: RMode config RUidGid www-moin www-moin RGroups www-moin WSGIScriptAlias /web/production/moin/wm/moin.wsgi WSGIDaemonProcess moin user=www-moin group=www-moin processes=5 threads=10 maximum-requests=1000 umask=0007 WSGIProcessGroup moin As I understand wsgi process start as Apache user (in my case www-moin) but maybe at first run(restart, reload) it starts as default Apache user ? My question is how I can change sock file default permissions ? Thanks. -- You received this message because you are subscribed to the Google Groups modwsgi group. To view this discussion on the web visit https://groups.google.com/d/msg/modwsgi/-/0an-R_sO9WAJ. To post to this group, send email to modwsgi@googlegroups.com. To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en. -- You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com. To unsubscribe from this group, send email to modwsgi+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.