Welcome ,
  1. Home
  2. Resolving PageCarton Permission Issues

PageCarton Documentation



Interested in coding widgets, classes, or methods? Check out the Code section!

Resolving PageCarton Permission Issues


Image

PageCarton is by default configured to run from outside of the web root as a security feature. This ought to help secure the content and file structure from intrusion and hacking attempts.

Good thing is that most web server installations run using an independent user that still have write access to a step outside the web root. To explain this, if the webroot is /home/adegoke/public_html, the webserver also should be able to write to /home/adegoke. PageCarton by default then uses /home/adegoke for example to write both core and site data.

However, a lot of web server installations do not allow writing outside of the web, in this case, the available options is either to change the core and site directory from the default using the pagecarton.json configuration file. The configuration file must be placed in the web root. A sample configuration file can be found in /pagecarton/core/local_html

Permission issues in LAMPP

The root cause of the permission issues usually with LAMPP is that PageCarton assumes that the webserver is running as a user that has priviledge to access all files and directory within the web root and a directory above the web root. Usually the directory is recursively /opt/lampp on xampp linux server.

Why is this issue always with Linux XAMPP or LAMPP server?

1. LAMPP on linux runs as user "daemon" that does not have privilege to write to LAMPP directory. So whenever PageCarton want to extract installation file into /opt/lampp/pagecarton, it would not be able to do that because user daemon does not have write access on /opt/lampp/

2. If you extract it yourself, the files will be created on your own user account and the web server user would also not have access to write into the directory.

Solution

I'll share the two straightforward methods to solve permission issues with PageCarton. There are plenty methods to achieve the same thing.

1. Recursively change ownership of LAMPP directory /opt/lampp to the user the webserver is running on. Usually "daemon" or "www-data".  Installation should go smoothly after this. Run the following code on command line to change ownership.

$ chown -hR daemon:daemon /opt/lampp

(If web server is running as daemon user)

This is the recommended method. Do this after you have copied PageCarton files to web root in the location where you want it installed.

2. Create a new directory manually in LAMPP directory named "pagecarton"

Recursively change permissions on this directory to allow anyone to read and write to the directory. Do this after you have copied PageCarton files to web root in the location where you want it installed. Also recursively change permissions on the directory holding the pagecarton files in the htdocs to allow read and write by everyone.

$ chmod -R 0777 /opt/lampp/pagecarton
$ chmod -R 0777 /opt/lampp/htdocs

 

 

← Previous "Steps in Creating a Theme""Cloning PageCarton Repository for Contribution" Next →


 

Similar article

 

How to Backup and Restore on PageCarton Photo

How to Backup and Restore on PageCarton

Backing up your PageCarton website helps protect your data against mistakes, server issues, hacking, or accidental deletion. A proper backup allows you to restore your website quickly if anything g...

article
 

 

Multi-Site Manager on PageCarton Photo

Multi-Site Manager on PageCarton

The Multi-Site Manager in PageCarton allows you to manage multiple websites from a single PageCarton installation. With the Multi-Site Manager, each site can have its theme, content, and setting...

article
 

 

How to Create a Form on PageCarton Photo

How to Create a Form on PageCarton

Forms on PageCarton allow you to collect information from website visitors, such as contact details, inquiries, or feedback. Follow the steps below to create a form on your PageCarton website. S...

article
 

 

Creating of Pages on PageCarton Photo

Creating of Pages on PageCarton

Step 1: Log in to the PageCarton Admin Panel 1.     Open your browser. 2.     Visit https://yourdomain.com/pc-admin (For local installation: http://lo...

article
 

 

How to add posts on PageCarton Photo

How to add posts on PageCarton

PageCarton makes it easy to create and publish posts such as blog articles, news updates, or announcements on your website. Follow the simple steps below to add a post successfully. Step 1: Log ...

article
 

 

How to Use Access Level Widgets to Control Content Visibility in PageCarton Photo

How to Use Access Level Widgets to Control Content Visibility in PageCarton

This article explains how to use PageCarton's Access Level Widgets to control content visibility based on user roles, such as content owners, invited users, or administrators. It helps ensure t...

article