Failed to install chmod 640?

I just installed phpbb on my site. According to phpbb advice, I assumed to set config.php chmod to 640. In filezilla (my ftp program), I tried right clicking on the file and then choosing file permissions 640, but it gives me this error:

500 'SITE CHMOD 640 config.php': command not understood

How do I change chmod? I am using Windows OS ...

EDIT: My server is Windows Server 2003

+1


a source to share


4 answers


JimG is right - we don't know your hosting type or FTP / SSH restrictions.

Fastest solution:



<?php
chmod("/home/youruser/yourwebsite/config.php", 0640);
?>

      

Hope you don't run into owner / group permission issues; in this case, you have to handle it with chown and chgrp function calls.

+2


a source


What environment is on the site?



If linux: Can you SSH into the server? ( Putty is a good SSH client for Windows). Once inside, change the directory where config.php is located and type chmod commnad there.

+1


a source


It looks like the FTP server doesn't support chmod. Do you have alternative access methods (like ssh)?

As a fun backup option, create a php script that sets permissions via PHP's chmod function and then looks at it.

+1


a source


You must have missed your edit. Mode 0640 is pretty pointless on Windows. The advice to install it this way applies to Unix-like systems. This means the owner is the only person who can change it and the group can read it and what it is. For your system, just make sure it is not writable by non-administrators by setting the appropriate ACLs (file properties, security).

0


a source







All Articles