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 "A Step By Step Guide To Back up and Downloading your Website on PageCarton.""Installing PageCarton via Composer" Next →


 

Similar article

 

A Step By Step Guide To Back up and Downloading your Website on PageCarton. Photo

A Step By Step Guide To Back up and Downloading your Website on PageCarton.

In the digital age, website is the face of a business or personal brand. Whether it's a blog, an e-commerce site, or a personal website. Backing up your website files is the first step towards secu...

article
 

 

Changing Number of Posts to Display on a Widget Photo

Changing Number of Posts to Display on a Widget

Another interesting customization feature just came in the latest PageCarton. Users of PageCarton can now change the number of post shown in embedded widget from the admin panel. For example, be...

Documentation Article
 

 

Installing PageCarton via Composer Photo

Installing PageCarton via Composer

If you have Composer installed on your computer, you can easily get PageCarton up by running the following commands on your command line.  # 1. Download PageCarton via composer compose...

article
 

 

Setting up PageCarton via Docker Photo

Setting up PageCarton via Docker

PageCarton now has a few files in its GitHub repository that helps to set it up on Docker easily. If you are familiar with Docker or a newbie, you should be able to get started with PageCarton...

article
 

 

Steps in Creating a PageCarton Website Offline Photo

Steps in Creating a PageCarton Website Offline

Creating a website has now been made easy with the use of Pagecarton, it's not necessary to know much about coding. If you have your contents ready, and the style of how your website wants to...

article
 

 

Steps in Creating a PageCarton Theme Photo

Steps in Creating a PageCarton Theme

Creating a PageCarton theme isn't actually a difficult task, but just that it might involve a long process and a little bit of how programming codes work. The main purpose of having a PageCarto...

article