Page 1 of 2

chmod problem

Posted: Tue Jan 09, 2007 9:57 pm
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

Posted: Tue Jan 09, 2007 10:44 pm
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.

Posted: Tue Jan 09, 2007 10:53 pm
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.)

Posted: Tue Jan 09, 2007 10:54 pm
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

Posted: Tue Jan 09, 2007 10:58 pm
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.

Re: chmod problem

Posted: Tue Jan 09, 2007 10:59 pm
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

Posted: Tue Jan 09, 2007 11:32 pm
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

Re: chmod problem

Posted: Wed Jan 24, 2007 10:39 pm
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.

Re: chmod problem

Posted: Thu Jan 25, 2007 12:01 pm
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

Posted: Thu Jan 25, 2007 12:09 pm
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....

Posted: Thu Jan 25, 2007 12:11 pm
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

Re: chmod problem

Posted: Thu Jan 25, 2007 12:18 pm
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);
?> 

Posted: Thu Jan 25, 2007 12:23 pm
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.

Posted: Thu Jan 25, 2007 12:32 pm
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

Posted: Thu Jan 25, 2007 1:41 pm
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!