[Zope3-Users] FreeBSD zopectl socket.error: (13, 'Permission denied')

Giovannetti, Mark giovanne at nrcan.gc.ca
Fri Mar 9 10:18:21 EST 2007


> -----Original Message-----
> From: zope3-users-bounces+giovanne=nrcan.gc.ca at zope.org 
> [mailto:zope3-users-bounces+giovanne=nrcan.gc.ca at zope.org] On 
> Behalf Of David Christensen
> 
> zope3-users:
> 
> I am a FreeBSD 6.2 and Zope newbie who is attempting to get 
> Zope 3.3.0 working.
> I have made and installed Zope 3 using the ports collection, and run
> mkzopeinstance.  Everything seemed to go okay.
> 
> 
> When I try to use zopectl to start Zope, I get an error:
> 
>     2007-03-08 18:52:21 root at p3800 ~
>     # /usr/local/www/Zope3/bin/zopectl start zope
>     . Traceback (most recent call last):
>       File 
> "/usr/local/www/Zope3/lib/python/zdaemon/zdrun.py", line 719,
>  in ?
>         main()
>       File 
> "/usr/local/www/Zope3/lib/python/zdaemon/zdrun.py", line 716,
>  in main
>         d.main(args)
>       File 
> "/usr/local/www/Zope3/lib/python/zdaemon/zdrun.py", line 243,
>  in main
>         self.run()
>       File 
> "/usr/local/www/Zope3/lib/python/zdaemon/zdrun.py", line 256,
>  in run
>         self.opensocket()
>       File 
> "/usr/local/www/Zope3/lib/python/zdaemon/zdrun.py", line 278,
>  in opensocket
>         sock.bind(tempname)
>       File "<string>", line 1, in bind
>     socket.error: (13, 'Permission denied')
>     . . . . . . .
> 
> 

Hello David,

You want to tidy up the permissions on some subdirectories
of your instance.

For example:  I have an instance named 'foo' and I must set 
the permissions on the log and var directories within that
instance.  Since the zope server runs as user 'www' (see zope.conf),
you can set the ownership of log and var to the 'www' user.
See listing below.  You can optionally change the group
as I also did (use 'chown -R www:www log var' from the instance
directory).

$ cd /usr/local/www/Zope3/foo
$ ls -la
total 16
drwxr-xr-x   7 root      wheel   512 Jan 29 13:13 .
drwxr-xr-x  11 root      wheel   512 Mar  1 15:31 ..
-r--r--r--   1 root      www     371 May 14  2004 README.txt
drwxr-xr-x   2 root      www    1024 Mar  8 14:01 bin
drwxr-xr-x   3 root      www     512 Jan 29 13:13 etc
drwxr-xr-x   3 root      www     512 Jan 29 13:13 lib
drwxr-xr-x   2 www       www     512 Jan 29 14:07 log
drwxr-xr-x   2 www       www     512 Feb 22 15:50 var

$ ls -la log var
log:
total 20534
drwxr-xr-x  2 www       www         512 Jan 29 14:07 .
drwxr-xr-x  7 root      wheel       512 Jan 29 13:13 ..
-r--r--r--  1 www       www          57 May 17  2004 README.txt
-rw-r--r--  1 www       www     1284088 Mar  7 21:09 access.log
-rw-r--r--  1 www       www    11340237 Mar  7 21:09 transcript.log
-rw-r--r--  1 www       www     8311290 Mar  7 21:09 z3.log

var:
total 160
drwxr-xr-x  2 www       www       512 Feb 22 15:50 .
drwxr-xr-x  7 root      wheel     512 Jan 29 13:13 ..
-rw-r--r--  1 www       www    152895 Mar  7 14:56 Data.fs
-rw-r--r--  1 www       www      1565 Feb 22 15:41 Data.fs.index
-rw-r--r--  1 www       www         6 Mar  7 21:08 Data.fs.lock
-rw-r--r--  1 www       www         0 Mar  7 21:07 Data.fs.tmp
-r--r--r--  1 www       www       299 May 17  2004 README.txt
srwx------  1 www       www         0 Jan 30 15:10 zopectlsock

The other thing to ensure is that the www user has read
access to the various lib/python directories.

Your exact error is due to being unable to create the 
var/zopectlsock socket.

Mark

-- 
613-947-1359
System Scientist / Scientifique, spécialiste des systèmes
Canada Centre for Remote Sensing / Centre canadien de télédéction
Natural Resources Canada, 588 Booth Street, Ottawa, Ontario, Canada, K1A 0Y7
Ressources naturelles Canada, 588 rue Booth, Ottawa, Ontario, Canada, K1A 0Y7
Government of Canada / Gouvernement du Canada
 


More information about the Zope3-users mailing list