Re: Permission error on trac log

Erik Huelsmann <[email protected]>
Newsgroups gmane.lisp.common-lisp-net.devel
Message-ID <CACOoB6h842=CLaG7Ss=8djGw=6EBdcnnfpP=TLKT4v3butkUGA@mail.gmail.com>
Hi Raymond,

The problem is that the ownership of the log file is incorrect. I've
corrected that, implemented log rotation, tested that it sets the group
owner to the project and that the files are created group writable, so all
project members can write to the file.

The reason that the file had to be created owned by the user www-data is
because the Trac daemon used to write to these files too (we don't use the
Trac httpd daemon at the moment).


Regards,


Erik.


On Thu, Sep 25, 2014 at 5:04 AM, Raymond Toy <[email protected]> wrote:

> Or maybe TRAC_ENV is not defined?
>
> Anyway, here is what git push produces. (The push succeeds, but the
> post-receive-hook stuff isn't executed.)
>
> emote: Traceback (most recent call last):
> remote:   File "/project/cmucl/public_html/git/trac-post-receive-hook.3.py",
> line 193, in <module>
> remote:     env = open_environment(TRAC_ENV)
> remote:   File "build/bdist.linux-x86_64/egg/trac/env.py", line 875, in
> open_environment
> remote:   File "build/bdist.linux-x86_64/egg/trac/core.py", line 124, in
> __call__
> remote:   File "build/bdist.linux-x86_64/egg/trac/env.py", line 284, in
> __init__
> remote:   File "build/bdist.linux-x86_64/egg/trac/env.py", line 640, in
> setup_config
> remote:   File "build/bdist.linux-x86_64/egg/trac/env.py", line 672, in
> setup_log
> remote:   File "build/bdist.linux-x86_64/egg/trac/log.py", line 27, in
> logger_handler_factory
> remote:   File "/usr/lib/python2.7/logging/__init__.py", line 901, in
> __init__
> remote:     StreamHandler.__init__(self, self._open())
> remote:   File "/usr/lib/python2.7/logging/__init__.py", line 924, in _open
> remote:     stream = open(self.baseFilename, self.mode)
> remote: IOError: [Errno 13] Permission denied:
> u'/project/cmucl/trac/log/trac.log'
> To ssh://[email protected]/var/git/projects/cmucl/cmucl.git
>
> On Wed, Sep 24, 2014 at 8:01 PM, Raymond Toy <[email protected]>
> wrote:
>
>> I just tried to push a commit to the cmucl repo and got an error from
>> cmucl's post-receive-hook.
>>
>> I think it's complaining that /project/cmucl/trac/log/trac.log has the
>> wrong permissions.  All of the backup logs are owned www-data.cmucl. But
>> the current log is www-data.www-data.  The actual permissions (rw-rw-r--)
>> on the file seems to be ok, compared to the others.
>>
>> --
>> Ray
>>
>
>
>
> --
> Ray
>
> _______________________________________________
> Clo-devel mailing list
> [email protected]
> http://common-lisp.net/cgi-bin/mailman/listinfo/clo-devel
>
>


-- 
Bye,

Erik.

http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.

_______________________________________________
Clo-devel mailing list
[email protected]
http://common-lisp.net/cgi-bin/mailman/listinfo/clo-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.