Permission issues on WSL

I had an Ubuntu WSL dev environment setup to work with Kirby for a long time, and now with some changes I made I get errors when accessing the panel stating that site/accounts and content and its subfolders are not writable. The folder permissions are 755 (drwxr-xr-x), and the owner is the default user (the one I am logging to the system with).

What did you change and how?

If the panel gives this error message, maybe the web server is running under a different user (which is usually the case in pure Linux). You could find out, if you set one of the mentioned directories to 777 and check if the web server can create file or dirs. Then you can also see the user and group of the web server.

777 is not recommended as permanent setting - although on a system which is exclusively used by you and only you it is not a problem, it is just not nice.

If you are finding this could be the solution there are some approaches to avoid 777 but giving the web server enough rights. One is, changing dirs to 775 and files to 664 and make sure that the group of files and dirs is a common group where your user and the web server user is member of (even better: adding the web ser user to the primary group of your user and adding your user to the primary group of the web server user). At the same time you need to change the umask of both (your user and the web server user) to 0002 (or 002) to make sure that future creations of file or dirs by one or the other will have the group bit set accordingly. Otherwise you will find yourself changing the permissions of all dirs and files again and again.

A more sophisticated approach will involve setting the SGID bit to all directories. In conjunction with a proper group and the umask setting this will keep you from worryingagain and again.

@Adspectus Thanks for the detailed response. I try to change permissions with chmod 777 -R content, but they stay the same. I resorted to download the non-writable folders from the live site, and this works for some reason.