Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory /var/www/html/mysite.com/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer not writable, please chmod to 777 #20

Closed
core45 opened this issue Jan 15, 2019 · 9 comments
Labels

Comments

@core45
Copy link

core45 commented Jan 15, 2019

I have an issue after deployment:
Directory /var/www/html/mysite.com/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer not writable, please chmod to 777

The fix is released already. You can see the ticket here:
passbolt/passbolt_api#274

Can you please update your package

@stevebauman
Copy link
Owner

stevebauman commented Jan 15, 2019

Hi @core45,

Did you publish the config file? The serializer path is already set to your applications storage path:

'Cache.SerializerPath' => storage_path('purify'),

I looked into the issue you mentioned, and that package does the same thing:

https://github.com/passbolt/passbolt_api/blob/36a4b4177b72a0cdef1406f8f6b99c10b4aafd1e/src/Utility/Purifier.php#L26-L32

@core45
Copy link
Author

core45 commented Jan 20, 2019

You are right. I didn't publish the config file.
After publishing it all is good.
Thank you!

@core45 core45 closed this as completed Jan 20, 2019
@alpharameeztech
Copy link

Even without publish the config file, it should suppose to work uninterrupted.

@nielslucas
Copy link

I cant seem to find anything about "publish the config file"? any reference where I can look into, i have the same error.

@pmochine
Copy link

Same error... the config file is published

@stevebauman
Copy link
Owner

I cant seem to find anything about "publish the config file"? any reference where I can look into, i have the same error.

@nielslucas It's literally the second installation step in the readme:

To install Purify, run the following in the root of your project:

composer require stevebauman/purify

Then, publish the configuration file using:

php artisan vendor:publish --provider="Stevebauman\Purify\PurifyServiceProvider"

HTMLPurifier requires a cache path, and will default to its own folder inside the vendor directory if you do not publish the configuration file.

Same error... the config file is published

Clear your configuration cache.

@stevebauman
Copy link
Owner

@alpharameeztech

Even without publish the config file, it should suppose to work uninterrupted.

Since this is a sanitation library, I do not want to merge the configuration with the default built-in configuration, as this may include settings that the developer does not want in their purified text. This could cause major issues for people and they may wonder why some attributes are being removed / included.

All developers must publish the configuration file to define explicitly what they want to be filtered and kept in the purified HTML.

@pmochine
Copy link

pmochine commented Oct 16, 2019

@stevebauman hey thanks for the responses to the others. I don't understand why it didn't work for me. I have a staging site on a vps, but when I started to deploy my page I found out that I had the same bug as in the comments.

I didn't want to give chmod rights to the vendor folder so I was forced to look for other packages. This one had the same issue mewebstudio/Purifier#27, and fixed it somehow. So with this package from the mewerbstudio, I don't have any issues at all and don't have to do anything. It worked out of the box, even though I prefer your package for the simpler settings much more...

And for the staging site, I'm using a zero deployment tool where all caches are cleared etc.

@stevebauman
Copy link
Owner

I didn't want to give chmod rights to the vendor folder so I was forced to look for other packages.

This was just fixed in v3.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants