The authentication token could not be stored

When I try to log into the panel I receive an error that says “The authentication token could not be stored”.

My /site/accounts folder has 755 permissions. The files inside are set to 644.

Why is this? It worked fine on my localhost, but after uploading it to my webserver I’m now getting this issue.

1 Like

Is the owner of the file you, or the account the server is running under?

My guess is your webserver is running as a different user than the one you uploaded the files as. When you uploaded them, it set you as the owner, leaving the webserver (probably www-data) as either a group or “other”. So when you try and log in, the web server attempts to write the security token to the user file, but can’t because only the owner (the uploading ftp account) has write permissions.

If that’s the case, you have a few options. The first is to delete the kirby account files, and recreate them by accessing the Panel (if no accounts exist, it prompts you to create one). This way, the server (probably www-data) creates the file, and gets the ownership permission.

The second is to just manually chown those files so that www-data (or whatever the webserver is running as) is the owner.

In either case, you might run into other similar issues in the Panel when it comes to modifying existing files (such as by hiding them, or changing text).