Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

The content (.md files) is not visible on remote, but is visible on localhost

Started by Muut Archive 9 years ago · 3 replies · 449 views
9 years ago

Good day, the problem: until the MD files is saved on remote server directly, it is not rendered by grav. When you enter the page, it is just empty, but actually it has an MD file. When you open MD file with "nano .md" and save it, the content nicely appears.

No errors or such is logs. What might be the case?

9 years ago

Most likely a permission problem. Try this on your on your grav root on the server:

BASH
#!/bin/sh
chown -R www-data:www-data .
find . -type f | xargs chmod 664
find ./bin -type f | xargs chmod 775
find . -type d | xargs chmod 775
find . -type d | xargs chmod +s
umask 0002

Source: https://learn.getgrav.org/troubleshooting/permissions

9 years ago

Could also be a cache issue. Disabling cache does it work, to check if this is the problem?

9 years ago

If cache would be the problem there would still be content on the page unless the .md was cached empty and then saved with content after and not updated because of the cache problem.

When Ёжик saved the .md on the server it got the right permissions by default. But two different environments will most likely have two different permission sets, therefor causing permission problems when changing environments.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1329 9 years ago
Archive · by Muut Archive, 9 years ago
2 922 9 years ago
Archive · by Muut Archive, 9 years ago
2 4051 9 years ago
Archive · by Muut Archive, 9 years ago
1 2930 9 years ago
Archive · by Muut Archive, 9 years ago
3 1108 9 years ago