Media version hashes dont match / media dir does not regenerate files

I just changed my dev environment from Windows + XAMPP to a local installment on Ubuntu/Apache. Already checked modules on Apache and PHP…everything fine. Permissions are also OK everywhere and I already confirmed that .htaccess is working.
The links and pages in general are working fine. Its only the links to the media-folder which are broken. The version hashes that are being generated don’t match the ones of the already created files in the media directory which is true for a brand new starterkit-installation also. There are also no new media assets being generated even when I empty or delete the whole folder. crying

@maltepodolski Please don’t cross post!

I’d say no media assets being generated sounds like either thumb driver (default is GD) not present/working, or apache not really having write permissions there

Well, GD is all on “enabled” and I have set permissions to my whole html folder recursively to me as user with read-write-execute for both files and directories?!

Can there be something in the way configuration-wise (apache2.conf / php?)

You sound like you understand what you are doing, but I am so often overlooking the basics and making the same mistakes, that I will risk to insist on asking: how is apache getting write access exactly ?

In my system (linux mint) apache is part of www-data group. To give it permission I first give recursive group ownership to www-data, then give it write permission as such:

chgrp -R www-data thefolder/
chmod -R g+rwX thefolder/

…not a very secure thing to do, but usually solves any permission problems I may be having.

Also, have you tried uploading files, creating pages or updating them through the panel on this installation?

In order to elaborate further if it is an permission issue, can you tell us

  • the exact permissions and ownerships of the media folder?
  • under which user/group apache is running?
  • whether the apache user is part of your users primary group?
  • whether your user is part of the apache users primary group?
  • the umask which is valid for your user and the apache user?


I think you’ve set me on the right track there. I was not aware of apache being its own user and having its own group. By now all files and directories are owned by me and my group so I have to change that. Apache is indeed using ww-apache. Will try that…

@Adspectus has reccomended to me previously a different approach to permissions, here.

Case closed: it were the write permissions for the apache-user.

  1. Added myself to the www-data group
  2. Gave that group rwx + s for files created in the future
  3. Changed ownership of mediafolder to me as user and www-data as group (recursively)
  4. Deleted media folder to make kirby create it anew.