chmod problem

Having trouble installing serendipity?
stifler
Regular
Posts: 14
Joined: Tue Jan 09, 2007 8:57 pm
Location: bavaria, germany

chmod problem

Post by stifler »

hey guys,

uploaded serendipity to my webspace. everything works, i get the installation screen and i enter the data. but i cant set the .htaccess and the serendipity_config_local.inc.php into CHMOD 777.
When I enter 777 I get the ftp response 550 SITE CHMOD command failed both times.
The htaccess is then in the 666 CHMOD and the serendipity_config_local.inc.php in 700 CHMOD.

Any ideas how i can fix this or do i have to contact my provider? I installed serendipity on another webspace last week and it worked perfectly.

One last thing, when I get the first screen with the report about all the php configs I get for "operating system" and "webserver" both times

Code: Select all

Warning: Wrong parameter count for php_uname() in /home/httpd/htdocs/xxx/net/include/admin/installer.inc.php on line 104
Is this related to the CHMOD thing?

Thanks for your help
stifler
Davy
Regular
Posts: 109
Joined: Fri Oct 13, 2006 2:06 pm
Location: The Netherlands

Post by Davy »

Who is the "owner" of that two files? If it's "apache" or "php" or something, you should CHMOD these files using PHP. That's a permission problem.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

I'm not sure about the uname(), sorry.

But I've seen the permissions thing before. 777 is very permissive, even dangerous. Some providers will protect their other customers on shared servers (and you, by default) by configuring their FTP servers to refuse any attempt to chmod 777.

Try using something a little more restrictive: 775. (Owner rwx, group rwx, others r-x.)
Judebert
---
Website | Wishlist | PayPal
stifler
Regular
Posts: 14
Joined: Tue Jan 09, 2007 8:57 pm
Location: bavaria, germany

Post by stifler »

thanks for your answer. stupid question, how do i see who the owner is? with my ftp prog? and then how to set the CHMOD by a php script?


thanks judebert for your answer, i tried all possible CHMOD's, they all fail, guess they are restricted
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Yes, your FTP program should show the user. A PHP script can use chmod() to change permissions; check it out on http://php.net.

Unfortunately, servers are often configured in ways that cause problems for PHP chmod(). It's dangerous, and so often forbidden.
Last edited by judebert on Tue Jan 09, 2007 10:59 pm, edited 1 time in total.
Judebert
---
Website | Wishlist | PayPal
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: chmod problem

Post by garvinhicking »

Hi!

You could try the "fixperm.php" script mentioined in the FAQ on www.s9y.org to change permissions?

The php_uname thing is unrelated and not really problematic; it just means that your provider seems to use a non-standard PHP installation or on an exotic operating system?

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stifler
Regular
Posts: 14
Joined: Tue Jan 09, 2007 8:57 pm
Location: bavaria, germany

Post by stifler »

the fixperm.php isn't working. apache hasn't more rights than the ftp it seems. will call my provider tomorrow.

thks for your help guys
Xanthouos
Regular
Posts: 115
Joined: Wed Mar 02, 2005 6:59 pm
Contact:

Re: chmod problem

Post by Xanthouos »

garvinhicking wrote:Hi!

You could try the "fixperm.php" script mentioined in the FAQ on www.s9y.org to change permissions?

The php_uname thing is unrelated and not really problematic; it just means that your provider seems to use a non-standard PHP installation or on an exotic operating system?

HTH,
Garvin
Is there a way to make the script chmod all files/folders in a dir? It happens every time I have to move an installation to a new server, that I have to chmod the plugin dir/sub-dir/files etc. Very, very time consuming to do one by one.
I came across a script that should do that, but it didn't work. http://wiki.splitbrain.org/wiki:tips:fixperms.php

Thanks in advance.
If you can't be a missionary, you can support a missionary.
~~~~~~~~~~~~~~~~~~~~~
www.GetMepis.com
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: chmod problem

Post by garvinhicking »

Hi!

Hm, that fixperms.php script should do the work! What happens if you call it? What output do you get?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Xanthouos
Regular
Posts: 115
Joined: Wed Mar 02, 2005 6:59 pm
Contact:

Post by Xanthouos »

Code: Select all

starting...
chmod 0777 /home/butlers/public_html/blog/plugins/serendipity_event_page_nugget FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_page_nugget/serendipity_event_page_nugget.php FAILED
chmod 0777 /home/butlers/public_html/blog/plugins/serendipity_event_galleryimage FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_galleryimage/serendipity_event_galleryimage.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_galleryimage/lang_en.inc.php FAILED
chmod 0777 /home/butlers/public_html/blog/plugins/serendipity_event_galleryimage/UTF-8 FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_galleryimage/UTF-8/lang_ja.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_galleryimage/lang_ja.inc.php FAILED
chmod 0777 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/lang_bg.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/lang_tn.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/lang_de.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/lang_pl.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/serendipity_event_templatechooser.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/lang_zh.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/lang_en.inc.php FAILED
chmod 0777 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/UTF-8 FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/UTF-8/lang_bg.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/UTF-8/lang_tn.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/UTF-8/lang_de.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/UTF-8/lang_pl.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/UTF-8/lang_zh.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/UTF-8/lang_pt_PT.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/UTF-8/lang_fr.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/UTF-8/lang_es.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/UTF-8/lang_ko.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/UTF-8/lang_ja.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/lang_pt_PT.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/lang_fr.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/lang_es.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/lang_ko.inc.php FAILED
chmod 0666 /home/butlers/public_html/blog/plugins/serendipity_event_templatechooser/lang_ja.inc.php FAILED
.....and so on through the whole dir....
If you can't be a missionary, you can support a missionary.
~~~~~~~~~~~~~~~~~~~~~
www.GetMepis.com
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Hm, it seems that on your current server the permissions cannot be changed by PHP!

You could try to remove every '@' character in the fixperms.php script, that should give you some extra error messages.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Xanthouos
Regular
Posts: 115
Joined: Wed Mar 02, 2005 6:59 pm
Contact:

Re: chmod problem

Post by Xanthouos »

garvinhicking wrote:Hi!

Hm, that fixperms.php script should do the work! What happens if you call it? What output do you get?

Regards,
Garvin
Ok, well, the above was the output from that other script. When running the fixperms.php (edited) I get the following:

Code: Select all

Warning: chmod() [function.chmod]: Operation not permitted in /home/butlers/public_html/blog/plugins/serendipity_plugin_topreferers/fixperm.php on line 2
Edited script:

Code: Select all

<?php
chmod('/home/butlers/public_html/blog/plugins/serendipity_plugin_topreferers/serendipity_plugin_topreferers.php', 0777);
?> 
If you can't be a missionary, you can support a missionary.
~~~~~~~~~~~~~~~~~~~~~
www.GetMepis.com
Xanthouos
Regular
Posts: 115
Joined: Wed Mar 02, 2005 6:59 pm
Contact:

Post by Xanthouos »

garvinhicking wrote:Hi!

Hm, it seems that on your current server the permissions cannot be changed by PHP!

You could try to remove every '@' character in the fixperms.php script, that should give you some extra error messages.

Best regards,
Garvin
Without the @:

Code: Select all

starting...
<br />
<b>Warning</b>:  chmod() [<a href='function.chmod'>function.chmod</a>]: Operation not permitted in <b>/home/butlers/public_html/blog/plugins/fixdir.php</b> on line <b>27</b><br />
chmod 0777 /home/butlers/public_html/blog/plugins/serendipity_event_page_nugget FAILED
...etc.
If you can't be a missionary, you can support a missionary.
~~~~~~~~~~~~~~~~~~~~~
www.GetMepis.com
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Okay, as I've guessed: chmod execution is not possible on your current host. You need to contact your support for changing them, if using your FTP access doesn'T work either!

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Xanthouos
Regular
Posts: 115
Joined: Wed Mar 02, 2005 6:59 pm
Contact:

Post by Xanthouos »

garvinhicking wrote:Hi!

Okay, as I've guessed: chmod execution is not possible on your current host. You need to contact your support for changing them, if using your FTP access doesn'T work either!

Best regards,
Garvin
Is it an easy permission (execution) for the admin to set? What should I ask for, because it would be very handy to have this available.

Thank you!
If you can't be a missionary, you can support a missionary.
~~~~~~~~~~~~~~~~~~~~~
www.GetMepis.com
Post Reply