Arbit - project tracking

Dwoo

#78: chmod(): Operation not permitted in Dwoo/Template/String.php on line 493

Issue revisions

  • new by FMaz008 at 2010-S-02 19:42
  • closed by Jordi Boggiano at 2010-S-02 20:09
Type support support
State closed closed
Priority normal normal
Resolution invalid invalid
Assigned to Nobody
Scheduled for
Affected versions 1.1.1
Affected components Core
Last change Thursday 2 September 2010 20:09:23 UTC by Jordi Boggiano

Short description

Often, I get error like theses: chmod(): Operation not permitted in Dwoo/Template/String.php on line 493

All the folder are chmod 777 (developpement machine), so I don't figure out why Dwoo try to do a chmod anyway.

...

Environment

Ubuntu 10.04, LAMP setup.

...

Steps to reproduce

Sorry, it appear to be quite random

Expected behavior

No error.

Actual behavior

Here's the xDebug stack trace: Warning: chmod(): Operation not permitted in /path/framework/lib/3rd/Dwoo/Dwoo/Template/String.php on line 493

Call Stack:

0.0021 623104 1. {main}() /path/public_html/index.php:0 0.0052 677360 2. require('/path/framework/foo.php') /path/public_html/index.php:32 0.1445 2163408 3. Core_StructureDisplay->render() /path/framework/foo.php:94 0.1446 2164176 4. Dwoo->get() /path/framework/lib/Core/Display.php:34 0.1463 2168312 5. Dwoo_Template_String->getCompiledTemplate() /path/framework/lib/3rd/Dwoo/Dwoo.php:363 0.1992 3689168 6. Dwoo_Template_String->makeDirectory() /path/framework/lib/3rd/Dwoo/Dwoo/Template/String.php:368 0.2009 3692648 7. chmod() /path/framework/lib/3rd/Dwoo/Dwoo/Template/String.php:493

For the moment, I've place a @ before all chmod. ( I also had the same random error with the line 371)

  • Jordi Boggiano at Thursday 2 September 2010 20:09:23 UTC

    I have never seen this error even on more restrictive debian setups, so I'm afraid all I can advise you to do is to use $template->setChmod(null) on the template object before passing it to $dwoo->get(), which will effectively cancel those calls. Otherwise if you manage to reproduce it feel free to report this again.

  • Sven Rautenberg at Friday 3 September 2010 10:56:31 UTC

    I think I am seeing things like this, too, but here it is related to the compiled templates being put in the place Dwoo tries to put them as well by another source, e.g. uploading them as a user instead of letting Dwoo generate them. This of course results in an error when Dwoo tries to chmod a file that does not belong to the user account Dwoo runs as.

  • Jordi Boggiano at Friday 3 September 2010 11:38:43 UTC

    Well, that is one problem I really can't do much about I think.. Apart from putting @'s everywhere in the code :/

    You should not deploy or put compiled templates in svn imo, this is fairly easy to handle no matter what technique you use I think.