Jump to content

October CMS writePermission issue.

mrchow19910319

I am currently tryin to install OctoberCMS on my ubuntu machine.

Here are the steps  I took and the issue I run into,

 

# October CMS

## Installation

* Steps I took
  1. downloaed install-master from official site
  2. installed XAMPP 
  3. created a folder called `buddhistblog` inside this directory `/opt/lampp/htdocs`
  4. Copied isntall_files + install.php from the folder to `/opt/lampp/htdocs/buddhistblog`
  5. went to localhost/buddhistblog/install.php then got hit by the `writePermission` error
  6. 
  

* Issue: Permission to write to directories and files

* Tried Solution : 

```

/*does not work, cannot find directory*/
chown -R www-data:www-data /var/www/html/octobercms
chmod -R 755 /var/www/html/octobercms

/*does not work cannot access 'public_html': No such file or directory
*/
chmod -R ugo+rw public_html

/*does not work cannot access 'public_html': No such file or directory
*/
sudo chmod -R ugo+rw /opt/lampp/htdocs/october/html
```

 

I understand that you need to give october CMS the writting permission to system. But I couldnt find where the CMS is being installed . 

 

Does anyone know how to fix this? 

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

Open the install.php file in a text editor and see what's in it. You might be able to find where/when the error message is supposed to be shown and what's causing this 

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, IAmAndre said:

Open the install.php file in a text editor and see what's in it. You might be able to find where/when the error message is supposed to be shown and what's causing this 

thanks for the help. Here is another thread I created on another forum. I listed some of the troubleshooting I did later on.

 

https://www.freecodecamp.org/forum/t/writepermission-issue-with-october-cms/348232/3

 

about the install.php here is the file but I dont see any recorded error messege

Spoiler

<?php include 'install_files/php/boot.php'; ?><!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width">
        <title>October Installation</title>
        <link type="image/png" href="install_files/images/october.png" rel="icon">

        <!-- Styles -->
        <link href="install_files/css/vendor.css" rel="stylesheet">
        <link href="install_files/css/layout.css" rel="stylesheet">
        <link href="install_files/css/controls.css" rel="stylesheet">
        <link href="install_files/css/animations.css" rel="stylesheet">
        <link href="install_files/css/fonts.css" rel="stylesheet">

        <!-- Base URL -->
        <?php if (!isset($fatalError)): ?>
            <script>
            <!--
                installerBaseUrl = '<?= $installer->getBaseUrl() ?>';
            // -->
            </script>
        <?php endif ?>
    </head>
    <body class="js">

        <div id="wrap">

            <!-- Header -->
            <header>
                <div class="container" id="containerHeader"></div>

                <!-- Title -->
                <section class="title">
                    <div class="container" id="containerTitle"></div>
                </section>

            </header>

            <!-- Body -->
            <section class="body">
                <?php if (isset($fatalError)): ?>
                    <div class="container">
                        <div class="callout callout-danger"><?= $fatalError ?></div>
                    </div>
                <?php else: ?>
                    <div class="container" id="containerBody"></div>
                <?php endif ?>
            </section>

        </div>

        <!-- Footer -->
        <footer>
            <div class="container" id="containerFooter"></div>
        </footer>

        <?php if (!isset($fatalError)): ?>

            <!-- Render Partials -->
            <?php
                $partialList = [
                    'header',
                    'title',
                    'footer',
                    'check',
                    'check/fail',
                    'config',
                    'config/mysql',
                    'config/pgsql',
                    'config/sqlite',
                    'config/sqlsrv',
                    'config/fail',
                    'config/database',
                    'config/admin',
                    'config/advanced',
                    'starter',
                    'themes',
                    'themes/theme',
                    'project',
                    'project/project',
                    'project/plugins',
                    'project/plugin',
                    'project/themes',
                    'project/theme',
                    'project/suggestion',
                    'project/fail',
                    'progress',
                    'progress/fail',
                    'complete'
                ];
            ?>

            <?php foreach ($partialList as $file): ?>
                <script type="text/template" data-partial="<?= $file ?>">
                    <?php include 'install_files/partials/'.$file.'.htm'; ?>
                </script>
            <?php endforeach ?>

            <!-- Scripts -->
            <script src="install_files/js/vendor.js"></script>
            <script src="install_files/js/app.js"></script>
            <script src="install_files/js/check.js"></script>
            <script src="install_files/js/config.js"></script>
            <script src="install_files/js/starter.js"></script>
            <script src="install_files/js/themes.js"></script>
            <script src="install_files/js/project.js"></script>
            <script src="install_files/js/progress.js"></script>
            <script src="install_files/js/complete.js"></script>

            <!-- Bespoke Properties -->
            <script>
                /*
                 * Checker Page
                 */
                Installer.Pages.systemCheck.title = 'System Check'
                Installer.Pages.systemCheck.nextButton = 'Agree & Continue'

                Installer.Pages.systemCheck.requirements = [
                    { code: 'phpVersion', label: 'PHP version 7.0 or greater required' },
                    { code: 'curlLibrary', label: 'cURL PHP Extension is required' },
                    { code: 'liveConnection', label: 'Test connection to the installation server' },
                    { code: 'writePermission', label: 'Permission to write to directories and files', reason: 'The installer was unable to write to the installation directories and files.' },
                    { code: 'pdoLibrary', label: 'PDO PHP Extension is required' },
                    { code: 'mbstringLibrary', label: 'Mbstring PHP Extension is required' },
                    { code: 'fileinfoLibrary', label: 'Fileinfo PHP Extension is required' },
                    { code: 'sslLibrary', label: 'OpenSSL PHP Extension is required' },
                    { code: 'zipLibrary', label: 'ZipArchive PHP Library is required' },
                    { code: 'gdLibrary', label: 'GD PHP Library is required' }
                ]

                /*
                 * Config Page
                 */
                Installer.Pages.configForm.title = 'Configuration'
                Installer.Pages.configForm.nextButton = 'Continue'

                Installer.Pages.configForm.sections = [
                    { code: 'database', label: 'Database', category: 'General', handler: 'onValidateDatabase', partial: 'config/database' },
                    { code: 'admin', label: 'Administrator', category: 'General', handler: 'onValidateAdminAccount', partial: 'config/admin' },
                    { code: 'advanced', label: 'Advanced', category: 'Advanced', handler: 'onValidateAdvancedConfig', partial: 'config/advanced' }
                ]

                /*
                 * Starter Page
                 */
                Installer.Pages.starterForm.title = 'Getting started'

                /*
                 * Themes Page
                 */
                Installer.Pages.themesForm.title = 'Start from a theme'

                /*
                 * Project Page
                 */
                Installer.Pages.projectForm.title = 'Project details'
                Installer.Pages.projectForm.nextButton = 'Install!'

                Installer.Pages.projectForm.sections = [
                    { code: 'project', label: 'Project', partial: 'project/project' },
                    { code: 'plugins', label: 'Plugins', partial: 'project/plugins' },
                    { code: 'themes', label: 'Themes', partial: 'project/themes' }
                ]

                /*
                 * Progress Page
                 */
                Installer.Pages.installProgress.title = 'Installation progress...'
                Installer.Pages.installProgress.steps = [
                    { code: 'getMetaData', label: 'Requesting package information' },
                    { code: 'downloadCore', label: 'Downloading application files' },
                    { code: 'downloadPlugins', label: 'Downloading plugin: ' },
                    { code: 'downloadThemes', label: 'Downloading theme: ' },
                    { code: 'extractCore', label: 'Unpacking application files' },
                    { code: 'extractPlugins', label: 'Unpacking plugin: ' },
                    { code: 'extractThemes', label: 'Unpacking plugin: ' },
                    { code: 'setupConfig', label: 'Building configuration files' },
                    { code: 'createAdmin', label: 'Create admin account' },
                    { code: 'setupProject', label: 'Setting website project' },
                    { code: 'finishInstall', label: 'Finishing installation' }
                ]

                /*
                 * Final Pages
                 */
                Installer.Pages.installComplete.title = 'Congratulations!'

            </script>

        <?php endif ?>

    </body>
</html>

 

also on the OctoberCMS documentation page I saw this note: 

 

> Note: A detailed installation log can be found in the install_files/install.log file.

 

but when I open the said directory, I can't even find the log. What does it mean? 

 

the whole installation process I followed this tutorial : (you just need to watch until the 6 mins mark)

 

 

 

 

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, IAmAndre said:

Open the install.php file in a text editor and see what's in it. You might be able to find where/when the error message is supposed to be shown and what's causing this 

I solved it using this instruction 

https://october-plaza.com/blog/how-install-october-cms-wizard

 

thanks for the help!

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, IAmAndre said:

I'm glad it worked!

 

I’m back… with another issue I run into.

 

I was trying to setup mySQL server using octoberCMS 's instruction, but somehow it returns me this error :

 

Quote

SQLSTATE[HY000] [1045] Access denied for user ‘root’@‘localhost’ (using password: YES)

so I started doing these steps until I run into another error

// 1. stop mySQL
sudo /etc/init.d/mysql stop

// 2. Start MySQL in safe mode
sudo mysqld_safe --skip-grant-tables &

// the result I get: 

[1] 7770
➜  ~ 2020-02-07T19:42:08.681349Z mysqld_safe Logging to syslog.
2020-02-07T19:42:08.686942Z mysqld_safe Logging to '/var/log/mysql/error.log'.
2020-02-07T19:42:08.698297Z mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists.

[1]  + 7770 exit 1     sudo mysqld_safe --skip-grant-tables

// 3. Log into MySQL using root
mysql -uroot

// ERROR I GET
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

the issue description on stackoverflow is this :

 

Quote

I once had this problem and solved it by installing mysql-server, so make sure that you have installed the mysql-server, not the mysql-client or something else.

That error means the file /var/run/mysqld/mysqld.sock doesn't exists, if you didn't install mysql-server, then the file would not exist. But if the mysql-server is already installed and is running, then you need to check the config files.

The config files are:


/etc/my.cnf
/etc/mysql/my.cnf
/var/lib/mysql/my.cnf

In /etc/my.cnf, the socket file config may be /tmp/mysql.sock and in /etc/mysql/my.cnf the socket file config may be /var/run/mysqld/mysqld.sock. So, remove or rename /etc/mysql/my.cnf, let mysql use /etc/my.cnf, then the problem may solved.

my own issue right now is : I cannot find var/run/mysqld folder. the folder does not exist, but I do have mysql-server installed, I checked it using this command and it returns me this error

➜  ~ sudo systemctl status mysql

● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2020-02-08 03:41:23 CST; 5min ago
  Process: 7398 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=0/SUCCESS)
  Process: 7389 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 7400 (code=exited, status=0/SUCCESS)

Feb 08 03:40:06 zhouxiang-ThinkPad-E495 systemd[1]: Starting MySQL Community Server...
Feb 08 03:40:06 zhouxiang-ThinkPad-E495 systemd[1]: Started MySQL Community Server.
Feb 08 03:41:21 zhouxiang-ThinkPad-E495 systemd[1]: Stopping MySQL Community Server...
Feb 08 03:41:23 zhouxiang-ThinkPad-E495 systemd[1]: Stopped MySQL Community Server.

 

If it is not broken, let's fix till it is. 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, mrchow19910319 said:

SQLSTATE[HY000] [1045] Access denied for user ‘root’@‘localhost’ (using password: YES)

This usually means that there is an authentication issue. Are you able to log in to the database with this credentials and from the same computer? Just run a simple PHP script on the compter and see if it's able to log in.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×