how to run cleanup.sh file to remove over 2000 old files

chevy01xtreme

Joined: 2004-01-15
Posts: 80
Posted: Sun, 2009-01-04 20:29

ok i just upgraded to the lastest g2 version
how do i run the cleanup.sh file. i got shell access but how do i get it to run..

now my gallery is just showing a white page http://www.s10owners.com/gallery2/main.php

how do i fix that also now...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Sun, 2009-01-04 21:11

When visiting your page I get:
'403 Permission Denied
You do not have permission for this request /gallery2/main.php'

Gallery will run fine with the old files.
you can remove them at the shell prompt:

Quote:
# ./cleanup.sh

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
chevy01xtreme

Joined: 2004-01-15
Posts: 80
Posted: Sun, 2009-01-04 22:51
floridave wrote:
When visiting your page I get:
'403 Permission Denied
You do not have permission for this request /gallery2/main.php'

Gallery will run fine with the old files.
you can remove them at the shell prompt:

Quote:
# ./cleanup.sh

i tried and get this

[~]# ./cleanup.sh
-bash: ./cleanup.sh: No such file or directory

how do i get my page also to show up again? it did work...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Sun, 2009-01-04 23:10

You/yourhost must have done something to get the permission denied error. It is not related to the cleanup.sh
Like I said gallery will run fine with the old files, so fix the permissions first before worrying about the old files.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
chevy01xtreme

Joined: 2004-01-15
Posts: 80
Posted: Sun, 2009-01-04 23:34
floridave wrote:
You/yourhost must have done something to get the permission denied error. It is not related to the cleanup.sh
Like I said gallery will run fine with the old files, so fix the permissions first before worrying about the old files.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

what permissions should i look at fixing. is there somewhere where it tells me what folders files need what permissions

 
cjdutil

Joined: 2009-02-20
Posts: 12
Posted: Fri, 2009-02-20 18:13
chevy01xtreme wrote:
ok i just upgraded to the lastest g2 version
how do i run the cleanup.sh file. i got shell access but how do i get it to run..

now my gallery is just showing a white page http://www.s10owners.com/gallery2/main.php

how do i fix that also now...

There has been a lot of people asking the same question...
this is how I did it
upload cleanup.sh to yoursite.com/gallery2
make a simple PHP file with one line...
<?php system("/bin/sh cleanup.sh"); ?>
save as cleanup.php and upload it to yoursite.com/gallery2
open web browser and go to yoursite.com/gallery2/cleanup.php
you will see the page working like it's trying to open...
then a blank page
your all done.
check in FTP to see if files are gone.
if you would like confirmation, open cleanup.sh in a text editor and put ECHO "COMPLETE!" as the last line and save it.

 
tberman333
tberman333's picture

Joined: 2007-12-26
Posts: 41
Posted: Wed, 2009-04-15 16:32

This was very helpful... thanks. If anyone is still having problems with this, make sure the php and sh files are set to chmod 777 (I am not sure if they need that much permission, but that worked for me).