Issue with Creating Subpages - cannot create directory

Hello everyone,

I’m encountering an issue with creating subpages on a site using Kirby 3. Here are the details:

Environment:

  • PHP 8.1 with all necessary modules installed.
  • Kirby 3.9
  • The site works correctly on my local environment but faces issues on the production server.

Problem: When I try to create a subpage, I get the following error:

The directory “/usr/home/…/…/content/2_projets/_drafts/test” cannot be created

The system administrator mentioned that the absolute path /usr/home/... does not exist on the production server, and I should use paths relative to the website’s root directory (e.g., ./content/2_projets/_drafts/test).

I can create pages at the root level without any issues, suggesting that the permissions and basic configuration are correct.

  1. Is it possible that Kirby is using absolute paths that are not compatible with my production server configuration?
  2. How can I configure Kirby to use relative paths for creating subpages?
  3. Are there any specific Kirby configurations I should check to avoid this issue?

Thank you in advance for your help!

Adrien

To me this looks like the parent folder projects is not writable by the webserver user, please check file/folder permissions and ownership

Dear texnixe,

I have the same problem, but on a Windows computer:

I have tried (as a user) to set all files and folders to “write permission”, but it still happens.

Is there any way to “debug” Kirby, i.e. to find out where the error occurs, stop there, and then try to see why the problem is happening? I have already spent a lot of time trying to figure out what’s up, but have gotten nowhere so far. In the worst case, I have to re-create everything from start.

Whose permissions have you set? In this case, this is a PHP process that needs the permission. The question is, as which user does the PHP process run? Who has permissions to write in this directory. You also need to make sure to grant permissions recursively, not only to the current folder, but also the folders above.

Once again, I am stunned at your quick and helpful support. Thank you!

My problem was: I tried to remove the read-only attribute with the Windows FileExplorer, which did NOT work.

What worked:

attrib -r *.*  /s /d