update problem : chmod 777

Having trouble installing serendipity?
.g@sp.
Regular
Posts: 50
Joined: Thu Apr 20, 2006 2:01 pm
Location: Brussels, Belgium

update problem : chmod 777

Post by .g@sp. »

.g@sp. wrote:i'm gonna update my old 0.9 version to the 1.1 beta version.
i've made a backup of my existing files and of my DB.
So, now i just have to copy all the files extracted of the serendipity-1.1-beta1.tar.gz file in the serendipity folder on my server ? (except config_local.inc.php)
Is that right ?
I'm a little bit afraid doing a mistake...

(P.S. the templates_c dir has just the .EMPTY file, it looks weird :? )
It's done, but now, on the admin page, it tells me that my serendipity dir and the templates_c dir are not writables...

So i made the changes with filezilla, the rights are now 777, but it still tells me that it is not...

What can i do ???

thanx
Sorry for my poor english ;)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: update problem : chmod 777

Post by garvinhicking »

Hi!

Chances are, if s9y tells oyu that files are not writable, they are not writable. :)

Please check if your chmod command really worked.

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/
.g@sp.
Regular
Posts: 50
Joined: Thu Apr 20, 2006 2:01 pm
Location: Brussels, Belgium

Post by .g@sp. »

yep, it works perfectly...
in front of my serendipity dir, under permissions on filezilla, i have drwxrwxrwx, and the same in front of templates_c
And it doesn't change when i refresh and even when i close and reopen filezilla...

Si i'm really lost :shock:
Sorry for my poor english ;)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

What exactly does the s9y screen tell you? Make a screenshot maybe?

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/
.g@sp.
Regular
Posts: 50
Joined: Thu Apr 20, 2006 2:01 pm
Location: Brussels, Belgium

Post by .g@sp. »

Im' sorry, it's in french
Image

and inf filezilla i got this :

Image

:?
Sorry for my poor english ;)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Write a file called "test.php" in your s9y directory and call it via your browser. Use this content:

Code: Select all

<?php
echo substr(sprintf('%o', fileperms('/home/defactoa/www/blog/')), -4);
echo "<br />\n";
echo substr(sprintf('%o', fileperms('/home/defactoa/www/blog/templates_c/')), -4);
And then tell me the output of that.

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/
.g@sp.
Regular
Posts: 50
Joined: Thu Apr 20, 2006 2:01 pm
Location: Brussels, Belgium

Post by .g@sp. »

it tells me :
0777
0777
Sorry for my poor english ;)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Please try this updated script:

Code: Select all

<?php
echo substr(sprintf('%o', fileperms('/home/defactoa/www/blog/')), -4);
echo "<br />\n";
echo substr(sprintf('%o', fileperms('/home/defactoa/www/blog/templates_c/')), -4); 
echo "<br />\n";
if (is_writable('/home/defactoa/www/blog/')) {
  echo 'WRITABLE';
} else {
  echo 'NOT WRITABLE';
}
echo "<br />\n";

if (is_writable('/home/defactoa/www/blog/templates_c/')) {
  echo 'WRITABLE';
} else {
  echo 'NOT WRITABLE';
}
echo "<br />\n";
If your server is running PHP's SafeMode, you need to ensure that the user/group IDs of the owner of the directory are set so that PHP can access those directories.

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/
.g@sp.
Regular
Posts: 50
Joined: Thu Apr 20, 2006 2:01 pm
Location: Brussels, Belgium

Post by .g@sp. »

now it tells me :
0777
0777
NOT WRITABLE
NOT WRITABLE
garvinhicking wrote: If your server is running PHP's SafeMode, you need to ensure that the user/group IDs of the owner of the directory are set so that PHP can access those directories.
I don't understand that :? how can i know that my server is runnig PHP's safe mode ?
i never had any problems before that...
4 days ago everything worked perfectly :x
Sorry for my poor english ;)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Okay, there's definitely some PHP bug on your system, you should talk to your web provider.

As a temporary workaround you might want to edit your include/admin/upgrader.inc.php file. Replace all "is_writable($basedir)" to "!empty($basedir)" which will bypass the is_writable check, and hopefully be able to write files. If no files can be written, your web provider must intervene.

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/
.g@sp.
Regular
Posts: 50
Joined: Thu Apr 20, 2006 2:01 pm
Location: Brussels, Belgium

Post by .g@sp. »

ok it works for my basedir, but not for the templates_c dir, so i can't continue the install anyway...

and when i modify every "is_writable" by "!empty", i have a parse error :

Code: Select all

Parse error: syntax error, unexpected '.', expecting ')' in /home.13/d/e/f/defactoa/www/blog/include/admin/upgrader.inc.php on line 284
my line 284 (the 2nd one):

Code: Select all

<td width="200"><?php
            if ( !empty($basedir . PATH_SMARTY_COMPILE) ) {
                echo serendipity_upgraderResultDiagnose(S9Y_U_SUCCESS, WRITABLE);
i'm gonna contact the ovh helpers... but an you tell me what i have to ask them precisely ??

anyway, thank you to be so patient ;)

and about the safemode :
Image
Sorry for my poor english ;)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Ah, maybe you can replace is_writable just with is_dir; the 'empty()' one was bad, as you experienced :)
i'm gonna contact the ovh helpers... but an you tell me what i have to ask them precisely ??
Yes; show them your test.php script and ask them, why "FALSE" is returned for the is_Writable() check, even though you've set your dirs to 0777.

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/
.g@sp.
Regular
Posts: 50
Joined: Thu Apr 20, 2006 2:01 pm
Location: Brussels, Belgium

Post by .g@sp. »

garvinhicking wrote:Hi!

Ah, maybe you can replace is_writable just with is_dir; the 'empty()' one was bad, as you experienced :)
it doesn't work :?
i'm gonna contact the ovh helpers... but an you tell me what i have to ask them precisely ??
garvinhicking wrote:Yes; show them your test.php script and ask them, why "FALSE" is returned for the is_Writable() check, even though you've set your dirs to 0777.

Best regards,
Garvin

it's done, i'm waiting for their answer

thank you anyway :)
Sorry for my poor english ;)
.g@sp.
Regular
Posts: 50
Joined: Thu Apr 20, 2006 2:01 pm
Location: Brussels, Belgium

Post by .g@sp. »

hm it seems to be weird.
Someone told me that there is some protection when i set some file (or dir) to 777.
Is it possible to pass through this on the update of s9y ?
Because before that, everything was ok, the users had wrote a lot of topic in it... and now, they ask me to have the blog back :?

with the !empty, it tells me that the s9y dir was ok, but not the templates_c. how can i modify that ?? (with is_dir, both of them were "not writable")

thanx

P.S. i've set permissions to 1777, but your "test.php" script just tells me :
1777
1777
NOT WRITABLE
NOT WRITABLE
:(
Sorry for my poor english ;)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

I don't know about such protection. Please ask your provider how to proceed? Serendipity can't do something about it, you must have write privs.
with the !empty, it tells me that the s9y dir was ok, but not the templates_c. how can i modify that ?? (with is_dir, both of them were "not writable")
Hm, did you replace all is_writable checks?

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/
Post Reply