gencache_init: Failed to create directory: /var/www/.cache/samba - Read-only file system
-
Hello.
I am getting this error in the Nextcloud logs:
"gencache_init: Failed to create directory: /var/www/.cache/samba - Read-only file system"
As far as I can see on Google, it is an error related to permissions on that particular folder. But I am uncertain how to fix this in Cloudron.
Hoping someone here can help
-
Unless explicitly mentioned in the packaging, all those folders are read-only in Cloudron. Maybe we have to add this to the packaging then, but first we need to understand where this is coming from. Do you have any Nextcloud plugins/apps installed which cause this?
-
After some digging, I located the issue and managed to fix it. If someone else encounters the problem, here is a description of what was happening and how to fix it.
My Cloudron server is using external storage connected via CIFS. My issue was that I had mounted the external share incorrectly, but I hadn't noticed because it was actually working - just giving a lot of errors in the log, and (I realized today) running slowly.
The INCORRECT way I had set it up was:
- I had the volume added as a Cloudron CIFS volume.
- Then I added that volume on the storage tab in the app settings for Nextcloud on the Cloudron My Apps page.
- (Now comes the mistake) then inside the Nextcloud administrator settings, I attached the storage as CIFS with a direct link to the external share. Meaning that the settings I put in Cloudron weren't being used. This resulted in errors.
The correct way of doing it is as follows:
- Add the external storage as a volume in Cloudron.
- Add the share as read/write on the "storage" part of the app settings.
- Inside the Nextcloud administrator settings, add the storage on the external storage tab BUT add it as local storage with the path "/media/{ShareName}"
Nextcloud will treat the storage as something local on the server and not use its own CIFS (or SFTP) implementation which apparently isn't very good.
This seems to have solved the issue. I have no more errors in the log, and the file synchronization has gotten a lot faster now that Nextcloud doesn't have to call the CIFS share 7 times per file as it was doing in the incorrect configuration.
I hope this helps someone in the future
-
-