odan/twig-assets

An exception has been thrown during the rendering of a template ("chmod(): Operation not permitted").

dev-rfc opened this issue · 3 comments

It is possible to add a try catch around chmod or some configurable manner to avoid it? Because the script are working great but i am having issues on some enviroiments that i don't have the permission to do chmod (but have the permission to write). Also i usually set my files permission to 750.

A simple example is my WSL on Windows 10, i don't know why but i cannot use chmod inside my web directory (maybe because it's a symlink to a NTFS driver, probably)

Also, thank you, you saved me a lot of work because i was thinking to do a extension like this.

chmod

odan commented

Hi @renancavalieri

I think the chmod operation for the public directory should be a new option / setting. Then you can disable the chmod operation or set your own chmod value. What do you think of this idea?

odan commented

I just added this new option. Please update to version 1.6.0 and try it out. 'path_chmod' => -1,

It's working fine! I was preparing a commit to create a pull request but you was more faster.

Issue closed.

Thanks.