[Varnish] #1541: Permission problem on Mac OS X

Varnish varnish-bugs at varnish-cache.org
Mon Jun 30 06:17:03 CEST 2014


#1541: Permission problem on Mac OS X
---------------------------------+----------------------
 Reporter:  huguesalary          |       Type:  defect
   Status:  new                  |   Priority:  normal
Milestone:  Varnish 4.0 release  |  Component:  varnishd
  Version:  4.0.0                |   Severity:  normal
 Keywords:                       |
---------------------------------+----------------------
 Hi there,

 I just switched to varnish 4 from varnish 3.0.5, on Mac OS X 10.9.2.

 After a few trial-error I finally got a VCL that varnish 4 likes.

 However, I now get this error when trying to start varnish:

 {{{
 $ sudo varnishd -a 127.0.0.1:80 -T 127.0.0.1 -s malloc,256M -p
 http_req_hdr_len=32768 -f /usr/local/etc/varnish/magento.vcl

 Message from C-compiler:
 ld: can't open output file for writing './vcl.Qw7naIoS.so.ld_FCIJx5',
 errno=13 for architecture x86_64
 clang: error: unable to remove file: Permission denied
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)
 Running C-compiler failed, exit 1

 VCL compilation failed

 }}}

 The directory created by varnishd has the following permissions after
 creation:

 drwxr-xr-x  2 root  admin  68 Jun 29 21:14 Hugues-Alarys-MacBook-
 Pro-2.local

 Doing a chmod 777 on the directory containing the compiled VCL allows
 varnishd to start.

 My guess is that when varnishd starts, it switches from root to nobody,
 and nobody doesn't have the right permissions for that directory.

 Not sure what changed between 3.0.5 and 4.0. Maybe the VCL compilation is
 not carried by root anymore but by nobody? For security reasons?

 I haven't checked if this bug is present in 4.0.1 that has been release a
 few days ago.

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1541>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator



More information about the varnish-bugs mailing list