This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

GeorgeFoto
GeorgeFoto

I am trying to install October in a Ubuntu system but I am getting the permissions error. How should I solve this issue?

GeorgeFoto
GeorgeFoto

file_put_contents(/opt/lampp/htdocs/october/html/app/storage/meta/services.json): failed to open stream: Permission denied

adis.osmonov
adis.osmonov

sudo chown www-data -R /opt/lampp/htdocs/october/html/app

try this

GeorgeFoto
GeorgeFoto

Thanks for the reply, but it didn't worked. I installed October from CMD line and then when I tried to open it in the browser I got this issue.

Then I tried to install it from visiting the october/install.php but the System Check before installation is having an issue with the "Permissions to write to directories and files".

What should I do?

adis.osmonov
adis.osmonov

thy this: sudo chmod -R 775 /opt/lampp/htdocs/october/html/app

GeorgeFoto
GeorgeFoto

Thank you very much, the answer to this issue was

sudo chmod -R ugo+rw /opt/lampp/htdocs/october/html

Daniel81
Daniel81

Hi, I've also ran into this issue. I have opened an issue over on Github to try & resolve this as simply chmod'ing the app/storage directory only half works, but instead of getting a "permission denied" error, I'm getting a "file not found" error on the "services.json" file, which IS there and all files & folders have 777 permissions?! Weird

Anyway, hopefully with the help of the devs we can find a solution.

Flynsarmy
Flynsarmy

Sounds like your group was wrong. Try sudo chown -R www-data:www-data /opt/lampp/htdocs/october/html Then you don't need to set 'other' to read/write the way you've done.

You'll also need to confirm that apache is running under the www-data user/group. If it's not, replace www-data above with whatever user/group apache is running as.

Last updated

greenearthheir19829
greenearthheir19829

I tried to do local setup for my mac. But when navigating install.php in browser. the permission and grants for writing failed. Can I just key in this command line "sudo chown -R www-data:www-data /opt/lampp/htdocs/october/html" in my Terminal under the htdocs/xxx folder?

Shantarli
Shantarli

I suggest to you use Vagrant or use your own virtual machine as i did. I personally installed ubuntu 16.04 at VirtualBox and configured server manually to know how to do it with all that stuff like permissions, mysql, apache, php and it's extentisions, nginx and so on. Here's relatively fresh Vagrant tutorial: https://octobercms.com/blog/post/setting-local-october-cms-environment-vagrant-configuration-tutorial

Command line(assuming you're using MAMP) should be another. www-data:www-data - its user and group which most likely different at Mac OS, "/opt/lampp/htdocs/october/html" - folder where all your project files live, in Mac OS(again, assuming you're using MAMP) it's "/Applications/MAMP/htdocs/". Read some documentation about your enviroment, google some tuts, try it and give us more information to help you. Thank you!

Parsec
Parsec

I'm on a Mac myself, but use a virtual machine to test the server setup and website. I'm not sure Apache on Mac (if installed) has the user www-data assigned to it. You can test by making the directory tree of your site world-readable/writable to see if it works (sudo chmod -R 777 /var/www/your-site)

Shantarli
Shantarli

Parsec said:

I'm not sure Apache on Mac (if installed) has the user www-data assigned to it.

I believe it must be "_www" user and group but who cares, everybody uses virtual machine :D

vokeworks53269
vokeworks53269

Hi I would like to install October on Ubuntu 18.04 LTS. Someone kindly give me a link I can follow to help me install on CMD or MAMP. Your help is appreciated!

yfktn
yfktn

vokeworks53269 said:

Hi I would like to install October on Ubuntu 18.04 LTS. Someone kindly give me a link I can follow to help me install on CMD or MAMP. Your help is appreciated!

Hi, Ubuntu user here ... Usually at the first time I've always use command:

php -r "eval('?>'.file_get_contents('https://octobercms.com/api/installer'));"

1-14 of 14

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.