Jump to content

required file and directory permissions


sluggo
 Share

Recommended Posts

Hello all,

 

I am disturbed by what appears to be the required permissions when installing processwire. I am getting this type of error message:

Directory /site/assets/ must be writable. Please adjust the server permissions before continuing.

I changed the perms from 755 to 775 and I don't want to use 777 (I don't even like 775).

% ls -l
total 8
drwxrwxr-x@  3 jtm6  staff    96 Mar 16 10:44 assets

So how do I proceed?

In addition, I am not even sure that I need ProcessWire. I am just trying to get a dev website open and the index.php file errors out. However, the top of this file has this comment:

 * ProcessWire Bootstrap

I am attaching the index.php file.


Anyway, thanks for your time

downloaded-index.php

Link to comment
Share on other sites

Hello and welcome to the forums! I personally get by using 755 on my local dev environments as well live installs. If you have not looked at it already, I would take a look at the following concerning permissions:

http://processwire.com/docs/security/file-permissions/

As for the comment "* ProcessWire Bootstrap", this enables ProcessWire's API to be used in other php scripts not already stored inside of ProcessWire's file structure. A good read can be found here:

https://processwire.com/api/include/

 

Link to comment
Share on other sites

2 hours ago, sluggo said:

I am disturbed by what appears to be the required permissions when installing processwire. I am getting this type of error message:

Directory /site/assets/ must be writable. Please adjust the server permissions before continuing.

I changed the perms from 755 to 775 and I don't want to use 777 (I don't even like 775).

ProcessWire shouldn't need 777 at all. You just need to make sure that the web server can write in site/assets, since this is where all dynamically changing data (caches, files, logs) is stored. You probably just need to give ownership to www-data (or whatever the webserver runs as) and can switch to 0750. If you're worried about security: the .htaccess file is quit strict in limiting access there.

 

  • Like 2
Link to comment
Share on other sites

1 hour ago, BitPoet said:

ProcessWire shouldn't need 777 at all. You just need to make sure that the web server can write in site/assets, since this is where all dynamically changing data (caches, files, logs) is stored. You probably just need to give ownership to www-data (or whatever the webserver runs as) and can switch to 0750. If you're worried about security: the .htaccess file is quit strict in limiting access there.

 

Thank you. I guess the solution was obvious:

sudo chown www assets

actually I used

sudo chown -R www site

Link to comment
Share on other sites

  • 1 year later...

I looked up what is set here...

folders: 755
files: 644 (config.php 400)

Maybe that's too general as well but it seems as those are the only settings - at least I can't find only those permissions here. It matches the details written here: https://processwire.com/docs/security/file-permissions/#permission-755-for-directories-and-644-for-files - so I'm fine with that for now.

Whenever I have the feeling I messed to much with those permissions I create a site profile, install it totally fresh and start from there. Doesn't happen that often but it happened.

 

What problems are you facing right now and what errors/warnings show up? Maybe it's something totally different.

  • Like 1
Link to comment
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
 Share

×
×
  • Create New...