Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 06:45:30 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155534 Posts in 21713 Topics by 7737 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: File permissions problem after transfer to new server, or something??  (Read 1456 times)
jorma

Offline Offline

Posts: 4


« on: June 16, 2010, 03:08:03 PM »

Hello,

I'm trying to transfer WB installation from test server to new server. I followed the instruction (from WB knowledge base). All went fine, until....

Problem is that I'll get "internal server error 500" when I try to access www.mydomain.com/wb -folder. I think that is because of permissions, because index.php is working fine only when I create replica of "index.php" manually. I mean I just create new file (called "index.php") on cPanel, copy-paste original content of index.php and save it. Then index.php will work (nothing else is working). I changed permission all folders, files and sub-folders  to "777" and but I still get same "internal server error 500". Also, my replica of index.php doesn't work anymore (after changing permissions)  shocked

Any ideas? Should I contact new server administration or what??

Best regards, Jorma
Logged
jorma

Offline Offline

Posts: 4


« Reply #1 on: June 17, 2010, 07:43:09 AM »

Hi again,

I got reply from web-server admin, that they don't allow permission more than 755  evil My default settings were 775 for all files&folders. Spent 6 hours of investigating and a lot of coffee angry

Jorma
Logged
DarkViper
Development Team
*****
Offline Offline

Posts: 1252


« Reply #2 on: June 17, 2010, 09:59:33 AM »

There is a easy way to check out which rights must be set:

at 1st load up a file named phpinfo.php onto your space.
Code: (phpinfo.php)
<?php
   phpinfo
();
?>

now run this file and check it's output.
In the first paragraph (at the top) you will find a setting called Server API

If that have a value like Apache 2.0 Handler (it's the bad case) then the rights must set to:

  0755 for all directories and all it's subdirs (default by FTP)
  0644 for all files (default by FTP)
special cases directories:  /languages/  /media/  /modules/  /pages/  /temp/ /template/
  0777 for all these directories and it's subdirs
  0666 for all files inside this directories and it's subdirs. Also for /config.php

If the value of Server API is like CGI/FastCGI (optimal case) then rights can be set to:

  0755 for all directories and all it's subdirs  (default by FTP)
  0644 for all files  (default by FTP)
no special settings are needed.

One thing you NEVER should do:

Never ever set a file-right to an odd value like 7 / 5 / 3 / 1. This means that the executable-flag is set.. and a script can be started everywhere  from outside. It provides a very big security risk!!

PHP is a interpreter-script-language...  in absolutely no case a PHP-script needs to be executable


Logged

Anleitungen lesen und selber nachdenken ist anstrengend...  Da lass ich doch lieber andere für mich denken...

In 1984:  Nineteen Eighty-Four is a unrealistic utopia!!
In 2012:  Nineteen Eighty-Four is a little piece only of our reality!!
zirzy

Offline Offline

Posts: 31


« Reply #3 on: June 17, 2010, 02:12:29 PM »

Jorma

Oletan että olet suomalainen Wink Mä en ite kasaa kaikkia omalle koneelle (kone täyttyy herkästi). Pelkästään "isoimmat" työt esim. sivupohjat, flas***, etc. Asennan aina uuden WB:n serverille just tällasten ongelmien vuoksi. Palveluntarjoajista kun ei tiedä Wink Tuon sitte vaan backendistä tarvittavat moduulit ja pohjat etc. Tekstit ja kuvat on sitten helppo heittää järjestelmään "myöhemmin". Varmuuskopiothan on sitten helppo ottaa jälkikäteen Wink
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6975


WWW
« Reply #4 on: June 17, 2010, 02:16:10 PM »

@zirzy: you are in the english section of the forum, please reply in English!

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

mikejd

Offline Offline

Posts: 160


« Reply #5 on: June 18, 2010, 09:41:51 AM »

I have been having exactly the same problem and was about to post a new thread when I saw this one.

I have recently downloaded WB2.8.1, unzipped it and tried to set up a couple of new sites using it. In both cases I was denied access due to file permissions. When I checked the file permissions both folders and files had the write permission set for the group and this is what is causing the problem. I have to reset all permissions, for folders to 755 and for files to 644 before everything works . With 185 folders and 2287 files this takes a long time and is very tedious.

Can anyone suggest either why this is happening or a simple way to quickly change the folder and file permissions.

cheers,
Mike
Logged
moit

Offline Offline

Posts: 8


« Reply #6 on: June 18, 2010, 10:40:18 AM »

Can anyone suggest ... a simple way to quickly change the folder and file permissions.
If you have shell access and are comfortable with the command line, you could use the chmod command. See http://movabletripe.com/archive/recursively-chmod-directories-only/

-M
Logged
DarkViper
Development Team
*****
Offline Offline

Posts: 1252


« Reply #7 on: June 18, 2010, 12:40:04 PM »

with File-Zilla FTP-Client it is not a problem to change the right masks recursively, see screenshot

Logged

Anleitungen lesen und selber nachdenken ist anstrengend...  Da lass ich doch lieber andere für mich denken...

In 1984:  Nineteen Eighty-Four is a unrealistic utopia!!
In 2012:  Nineteen Eighty-Four is a little piece only of our reality!!
ChrusR

Offline Offline

Posts: 46


« Reply #8 on: September 02, 2010, 09:28:20 AM »

There is a easy way to check out which rights must be set:

at 1st load up a file named phpinfo.php onto your space.
Code: (phpinfo.php)
<?php
   phpinfo
();
?>

now run this file and check it's output.
In the first paragraph (at the top) you will find a setting called Server API

If that have a value like Apache 2.0 Handler (it's the bad case) then the rights must set to:

  0755 for all directories and all it's subdirs (default by FTP)
  0644 for all files (default by FTP)
special cases directories:  /languages/  /media/  /modules/  /pages/  /temp/ /template/
  0777 for all these directories and it's subdirs
  0666 for all files inside this directories and it's subdirs. Also for /config.php


with File-Zilla FTP-Client it is not a problem to change the right masks recursively, see screenshot


Thank you. I just need this. Maybe this should be integrated in the install docu or online docu...

If I can change the PHP-Version to CGI via htaccess on my shared Webhosting-Space, then this is recommended to do?
« Last Edit: September 02, 2010, 09:56:21 AM by ChrusR » Logged

Testing WB since June 2010. HMTL & CSS Knowledge, some JS-Hacking, no real PHP & SQL-Knowledge.
mjm4842

Offline Offline

Posts: 227


« Reply #9 on: September 13, 2010, 07:24:30 AM »

Thanks DarkViper, the information you provided is very helpful. It has already resolved a couple of problems for me.

Based on your information, I have created a tool called WebsiteBaker Fix Permissions which should help people resolve WebsiteBaker issues related to permissions. Check it out at:

http://www.websitebaker2.org/forum/index.php/topic,19268.msg129174.html#msg129174

With best regards,

Michael

There is a easy way to check out which rights must be set:

at 1st load up a file named phpinfo.php onto your space.
Code: (phpinfo.php)
<?php
   phpinfo
();
?>

now run this file and check it's output.
In the first paragraph (at the top) you will find a setting called Server API

If that have a value like Apache 2.0 Handler (it's the bad case) then the rights must set to:

  0755 for all directories and all it's subdirs (default by FTP)
  0644 for all files (default by FTP)
special cases directories:  /languages/  /media/  /modules/  /pages/  /temp/ /template/
  0777 for all these directories and it's subdirs
  0666 for all files inside this directories and it's subdirs. Also for /config.php

If the value of Server API is like CGI/FastCGI (optimal case) then rights can be set to:

  0755 for all directories and all it's subdirs  (default by FTP)
  0644 for all files  (default by FTP)
no special settings are needed.

One thing you NEVER should do:

Never ever set a file-right to an odd value like 7 / 5 / 3 / 1. This means that the executable-flag is set.. and a script can be started everywhere  from outside. It provides a very big security risk!!

PHP is a interpreter-script-language...  in absolutely no case a PHP-script needs to be executable



Logged

Frustrated? Spending too much time developing when all you really want is a working website? Contact me directly if I can be of services to you.
___________________ ________


www.tngconsulting.c a
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!