tags:

views:

584

answers:

4

I just installed phpbb on my website. According to phpbb advice, I was suppose to set the config.php chmod to 640. In filezilla(my ftp program), I tried right-click the file, then select file permissions to 640, but it gives me this error:

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

How do i change the chmod? I am using windows OS...

EDIT: My server is Windows Server 2003

+1  A: 

What kind of enviroment is the site hosted in?

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

Thorbjørn Hermansen
+1  A: 

Sounds like the FTP server doesn't support chmod. Do you have any alternative access methods (e.g. ssh)?

As an amusing fallback option, create a php script that sets the permissions via PHP's chmod function and then browse to it.

JimG
+1  A: 

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

Quickest solution:

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

Hope you won't run into owner/group permission problems; in that case, you'll have to handle it with more chown and chgrp function calls.

Brian Clozel
A: 

Must've missed your edit. Mode 0640 is pretty meaningless to Windows. The advice to set it that way applies to Unix-like systems. It means that the owner is the only person who can change it, and the group can read it, and that's it. For your system, just make sure it's not writable by non-admins by setting appropriate ACLs (file properties, security).

JimG