Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 10:32 am EST

Geeklog Forums

Can't install


tgraupmann

Anonymous
I'm installing on a server that only supports sftp. So I had to prepare the files offline.

I keep getting an install error that stops me.

File/Directory Permissions

/thepath/geeklog-1.7.0/db-config.php Change to 666 (Currently 666)

/thepath/geeklog-1.7.0/backups/ Change to 777 (Currently 777)

/thepath/geeklog-1.7.0/data/ Change to 777 (Currently 777)

/thepath/geeklog-1.7.0/logs/error.log Change to 666 (Currently 666)

/thepath/htdocs/siteconfig.php Change to 666 (Currently 666)

/thepath/htdocs/backend/geeklog.rss Change to 666 (Currently 666)

/thepath/htdocs/images/articles/ Change to 777 (Currently 777)

/thepath/htdocs/images/topics/ Change to 777 (Currently 777)

/thepath/htdocs/images/userphotos Change to 777 (Currently 777)

Am I missing something? I set the permissions. Is there a way to force the install? Or at least clear the error to retry.
 Quote

tgraupmann

Anonymous
I changed the permissions like it wants. But still it won't advance.
 Quote

tgraupmann

Anonymous
Something is wrong here:

Text Formatted Code

            foreach ($file_list as $file) {
                if (is_writable($file)) {
                        $writable = "true";
                }
                else
                {
                        $writable = "false";
                }
                if (!is_writable($file)) {
                    if (is_file($file)) {
                        $perm_should_be = '666';
                    } else {
                        $perm_should_be = '777';
                    }
                    $permission = sprintf("%3o", @fileperms($file) & 0777);
                    $display_permissions    .= '<p><label class="' . $perms_label_dir . '"><code>' . $file . '</code></label>' . LB
                                            . ' <span class="permissions-list">' . $LANG_INSTALL[12] . ' '. $perm_should_be .'</span> ('
                                            . $LANG_INSTALL[13] . ' ' . $permission . ') writable=' . $writable . ' owner='
                                            . fileowner($file) . '</p>' . LB ;
                    $chmod_string .= $file . ' ' ;
                    $num_wrong++;
                }
            }
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
I don't think there's anything wrong with that code. Do the messages not go away when you reload the page (after you changed the permissions)?

bye, Dirk
 Quote

tgraupmann

Anonymous
The trouble is the web user doesn't have write access to the files even when the permissions are 777.

I need a way to upgrade the database, and modify the files offline.

Unless there's a way to say that 'nobody' can also edit these files.

I hate capcha.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Ideally, Geeklog's files should be owned by the user that's running the webserver. That would allow you to use conservative permissions (644 for files, 755 for directories).

Can you tell us a bit more about your server setup?

If it's your own server, you should be able to change file ownership with the chown command. On a shared server, things are often set up such that uploaded files are owned by a user that is in the same group as the webserver user, so you may have to go with 664 / 775 instead. Not sure why things aren't working when you go with 777, though.

bye, Dirk
 Quote

tgraupmann

Anonymous
I've had a sourceforge open source project since about 2003. I used Geeklog 1.3 for blog software. Now I'm trying to upgrade to Geeklog 1.7.

I need to figure out which user the blog runs as, because the server is locked down.

The geeklog install script just checks the chmod permissions. But it could be more verbose to say, your user "blah" also needs write permissions to these files.

I'll have to read more docs about which user is running.

https://sourceforge.net/apps/trac/sourceforge/wiki/Developer%20web

https://sourceforge.net/apps/trac/sourceforge/wiki/Project%20web
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
I did some quick tests on SourceForge (with a test script, not with Geeklog) and couldn't get write access to a file either. Not sure how that's supposed to work on their servers these days (it's been a while since Geeklog was on SourceForge ...).

Try asking their support.

bye, Dirk
 Quote

tgraupmann

Anonymous
I was able to get geeklog working last time by installing offline, and then copying the files along with the db to sourceforge.

I could post new stories with geeklog. But uploading images never worked because of the write permission issue.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Hmm, okay - the (new-ish, since 1.5.0) install script wasn't really written with such a setup in mind.

You could probably get it to work if you make the changes in db-config.php and siteconfig.php manually and comment out the various checks for write access in the install script.

This could be a feature request: Make Geeklog work in read-only environments. I guess we could try and make using Geeklog in such a "hostile" environment less of a pain. So feel free to submit such a feature request.

bye, Dirk
 Quote

tgraupmann

Anonymous
I got it working.

Sourceforge has a persistent space that let's you put files to be writable. You just have to make symbolic links to the persistent area.

More info:
https://sourceforge.net/apps/trac/sourceforge/wiki/Project%20web%20and%20developer%20web%20platform#Read-onlywebspace

I made the following script.

Text Formatted Code
chmod 666 /home/groups/a/ap/aprojectname/geeklog-1.7.0/db-config.php
chmod 777 /home/groups/a/ap/aprojectname/geeklog-1.7.0/backups/
chmod 777 /home/groups/a/ap/aprojectname/geeklog-1.7.0/data/
chmod 666 /home/groups/a/ap/aprojectname/geeklog-1.7.0/logs/error.log
chmod 666 /home/groups/a/ap/aprojectname/htdocs/siteconfig.php
chmod 666 /home/groups/a/ap/aprojectname/htdocs/backend/geeklog.rss
chmod 777 /home/groups/a/ap/aprojectname/htdocs/images/articles/
chmod 777 /home/groups/a/ap/aprojectname/htdocs/images/topics/
chmod 777 /home/groups/a/ap/aprojectname/htdocs/images/userphotos

mkdir /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0
mkdir /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0/backups/
mkdir /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0/data/
mkdir /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0/logs
mkdir /home/groups/a/ap/aprojectname/persistent/htdocs/
mkdir /home/groups/a/ap/aprojectname/persistent/htdocs/backend/
mkdir /home/groups/a/ap/aprojectname/persistent/htdocs/images/
mkdir /home/groups/a/ap/aprojectname/persistent/htdocs/images/articles/
mkdir /home/groups/a/ap/aprojectname/persistent/htdocs/images/topics/
mkdir /home/groups/a/ap/aprojectname/persistent/htdocs/images/userphotos

cp /home/groups/a/ap/aprojectname/geeklog-1.7.0/db-config.php /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0/db-config.php
cp /home/groups/a/ap/aprojectname/geeklog-1.7.0/logs/error.log /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0/logs/error.log
cp /home/groups/a/ap/aprojectname/htdocs/siteconfig.php /home/groups/a/ap/aprojectname/persistent/htdocs/siteconfig.php
cp /home/groups/a/ap/aprojectname/htdocs/backend/geeklog.rss /home/groups/a/ap/aprojectname/persistent/htdocs/backend/geeklog.rss

rm /home/groups/a/ap/aprojectname/geeklog-1.7.0/db-config.php
mv /home/groups/a/ap/aprojectname/geeklog-1.7.0/backups/* /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0/backups/
rmdir /home/groups/a/ap/aprojectname/geeklog-1.7.0/backups/
mv /home/groups/a/ap/aprojectname/geeklog-1.7.0/data/* /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0/data/
rmdir /home/groups/a/ap/aprojectname/geeklog-1.7.0/data/
rm /home/groups/a/ap/aprojectname/geeklog-1.7.0/logs/error.log
rm /home/groups/a/ap/aprojectname/htdocs/siteconfig.php
rm /home/groups/a/ap/aprojectname/htdocs/backend/geeklog.rss
mv /home/groups/a/ap/aprojectname/htdocs/images/articles/* /home/groups/a/ap/aprojectname/persistent/htdocs/images/articles/
rmdir /home/groups/a/ap/aprojectname/htdocs/images/articles/
mv /home/groups/a/ap/aprojectname/htdocs/images/topics/* /home/groups/a/ap/aprojectname/persistent/htdocs/images/topics/
rmdir /home/groups/a/ap/aprojectname/htdocs/images/topics/
mv /home/groups/a/ap/aprojectname/htdocs/images/userphotos/* /home/groups/a/ap/aprojectname/persistent/htdocs/images/userphotos
rmdir /home/groups/a/ap/aprojectname/htdocs/images/userphotos

ln -s /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0/db-config.php /home/groups/a/ap/aprojectname/geeklog-1.7.0/db-config.php
ln -s /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0/backups/ /home/groups/a/ap/aprojectname/geeklog-1.7.0/backups
ln -s /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0/data/ /home/groups/a/ap/aprojectname/geeklog-1.7.0/data
ln -s /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0/logs/error.log /home/groups/a/ap/aprojectname/geeklog-1.7.0/logs/error.log
ln -s /home/groups/a/ap/aprojectname/persistent/htdocs/siteconfig.php /home/groups/a/ap/aprojectname/htdocs/siteconfig.php
ln -s /home/groups/a/ap/aprojectname/persistent/htdocs/backend/geeklog.rss /home/groups/a/ap/aprojectname/htdocs/backend/geeklog.rss
ln -s /home/groups/a/ap/aprojectname/persistent/htdocs/images/articles/ /home/groups/a/ap/aprojectname/htdocs/images/articles
ln -s /home/groups/a/ap/aprojectname/persistent/htdocs/images/topics/ /home/groups/a/ap/aprojectname/htdocs/images/topics
ln -s /home/groups/a/ap/aprojectname/persistent/htdocs/images/userphotos /home/groups/a/ap/aprojectname/htdocs/images/userphotos

chmod 666 /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0/db-config.php
chmod 777 /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0/backups/
chmod 777 /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0/data/
chmod 666 /home/groups/a/ap/aprojectname/persistent/geeklog-1.7.0/logs/error.log
chmod 666 /home/groups/a/ap/aprojectname/persistent/htdocs/siteconfig.php
chmod 666 /home/groups/a/ap/aprojectname/persistent/htdocs/backend/geeklog.rss
chmod 777 /home/groups/a/ap/aprojectname/persistent/htdocs/images/articles/
chmod 777 /home/groups/a/ap/aprojectname/persistent/htdocs/images/topics/
chmod 777 /home/groups/a/ap/aprojectname/persistent/htdocs/images/userphotos
 Quote

tgraupmann

Anonymous
The upgrade failed with a blank page. Where can I see the install log?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
In theory (and after a certain point in the install or upgrade process), you should be able to see errors in logs/error.log. Not sure if that worked in this environment. When doing the test I mentioned above, I also failed to make PHP display any error message in the browser, despite error_reporting(E_ALL). I think they're overdoing things a bit ...

bye, Dirk
 Quote

tgraupmann

Anonymous
Did you try and change your script to write into the persistent subfolder in your sourceforge project folder.
 Quote

All times are EST. The time is now 10:32 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content