Jump to content

Site/config.php not writable but readable?


Speed
 Share

Recommended Posts

I understand writable need to be locked and make it readable inside config.php. But... I am not sure I understand what I need to do to make writeable locked after reading from this link https://processwire.com/docs/security/file-permissions/#securing-your-site-config.php-file.  I opened config.php and could not find what I need to change.  Can anyone give me idea what I need to do? 

This came from after completion of PW installation. 

Capture.JPG

Link to comment
Share on other sites

To lock and protect the file, you will have to modify its permissions on the file system. To do that, you will have to execute "chmod 400 config.php" on command line. There is no "setting" inside config.php. 

To run that command,  you will have to gain ssh access to the server. If ssh is not your thing, you can change file permissions in your FTP client as well -- at least most FTP clients support it. In your FTP client, right-click on config.php and and click on file permissions. Then set the permissions to 400. 

 

 

  • Like 1
Link to comment
Share on other sites

Or if you have a local setup like I do on windows w/xampp, you'd navigate to the config file in windows explorer, right-click and choose the security tab to access the permission settings.  Windows ntfs doesn't understand chmod and linux permissions.

I used to run php on a shared commercial windows-based host and their control panel had a permissions tool, since using ftp clients wouldn't properly change permissions on ntfs.

 

Link to comment
Share on other sites

Thank you deltavik and Doug G. for clarification. I had permission changed by visiting host's cPanel > File manager.  Oh, FTP Filezilla didn't work. It keep on changing after I enter 400. As much I prefer using FTP over cPanel filemanager It'd be nice to know which FTP will work, Anyone?  Should I change Writable Permission for htaccess too? 

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...