coofercat / peeked

A browser-based content editor for Pico CMS
MIT License
3 stars 26 forks source link

Not saving edited files #2

Closed aaaton closed 8 years ago

aaaton commented 8 years ago

I am having the issue that peeked is not saving any files. It says "saved", when clicking the icon but nothing changes.

I am running locally on a macbook with the built in apachectl.

There is a mention of change permissions if needed in the readme. What is meant by this?

coofercat commented 8 years ago

Obviously, the UI shouldn't be saying "Saved" when it hasn't really done so. I'll see if there's anything I can do about that.

Your problem is (probably) ownership of files and processes. Usually, when you save files to your machine, they'll be owned by your user. However, Apache usually runs as a different user (either 'apache', 'httpd', 'webserver' or something else), so it can't overwrite your files.

You have a few choices:

aaaton commented 8 years ago

Thank you for your help! I tried changing the files in content to world writable, which helped. Would this be a safe solution if deployed on a real server, or do I need to change the owner of the files?

I mean the files aren't really accessible through the browser anyhow, without going through pico first...

coofercat commented 8 years ago

Personally, I don't like the idea of world-writable files, but a lot of people have them on their production systems and are perfectly fine. You may be able to tighten up a bit by adding your own user to the httpd group (and make them group writable) instead though.