austintoddj / canvas

Publishing on your own terms
http://trycanvas.app
MIT License
3.26k stars 521 forks source link

Permissions errors while changing theme #295

Closed trahma closed 7 years ago

trahma commented 7 years ago

While trying to change the theme on a base install yields the error

ErrorException in Filesystem.php line 204: copy(/var/www/public/vendor/canvas/build/assets/css/frontend-302c0069fb.css): failed to open stream: Permission denied

I've followed the directions for a base install at https://cnvs.readme.io/docs. There were no directions listed for adjusting permissions on ./storage or public/vendor/canvas/build.

Perhaps I missed something, I feel like this should have been documented though.

austintoddj commented 7 years ago

@trahma Could you try running the following command from a terminal in the project root? If that works for you, I'll go ahead and include it in the docs.

sudo chmod -R 777 storage/

Per Laravel's installation, you need to alter permissions to the storage directory.

trahma commented 7 years ago

That was the first fix, the second fix was that I had to give write permissions to public/vendor for the webserver.

austintoddj commented 7 years ago

Ok. Thanks for running that test. Would you be able to briefly document those changes you ran and send them to me at austin.todd.j@gmail.com? I'll look them over and then get them in the docs as soon as possible.

austintoddj commented 7 years ago

@reliq Just ran into this same issue, here's the output of the error:

screen shot 2017-01-10 at 8 36 15 am

Issue was resolved by doing what @trahma stated above, changing permissions of the public/vendor directory. Do you think it's something we need to add into the install documentation?

trahma commented 7 years ago

Sorry haven't had a chance to send the email will do so later today. The easiest way to resolve this issue is to set 777 however for some users that may not be the safest solution. Out of the laravel docs:

Directory Permissions After installing Laravel, you may need to configure some permissions. Directories within the storage and the bootstrap/cache directories should be writable by your web server or Laravel will not run. If you are using the Homestead virtual machine, these permissions should already be set.

ChristianYeah commented 7 years ago

Actuallly, change the owner of dict to apache or nginx will be fine. Quite simple

LittleHans8 commented 7 years ago

It seems the same error when I try to change my blog setting(path:/admin/settings) Although it output error,I refreshed the page,and it has been saved successfully

ErrorException in Filesystem.php line 204: copy(/var/www/html/blog/public/vendor/canvas/build/rev-manifest.json): failed to open stream: Permission denied

CANVAS_VERSION: v3.0.5 PHP_VERSION: 7.0.13-0ubuntu0.16.04.1 DATABASE_CONNECTION: MYSQL WEB_SERVER: nginx/1.10.0

austintoddj commented 7 years ago

Fixed in v3.1.1

sevmardi commented 6 years ago

@austintoddj I am still somehow experiencing this. v3.4.2 is installed.

Any ideas?

jringeisen commented 6 years ago

@sevmardi same here, I'm on version 3.4.3. Anytime I hit save in the settings I get this error:

copy(/home/forge/ringocodes.com/public/vendor/canvas/assets/js/vendor.js): failed to open stream: Permission denied