PDA

View Full Version : Web File Manager


vydra
11-28-01, 06:31 AM
Has anyone tried this php script on powweb servers? http://cwfm.sourceforge.net/
or knows of a better solution for a web-based file manager.
Thanks

DV

atari
6-5-03, 10:37 PM
Hey... i really want to implement this as well.. by far it looks like the best web file manager around...

However when I installed it, i got various errors.. The install file was not detailed enough for me (I'm new to php :().

These are the errors i got.

Warning: main(lang/.php) [function.main]: failed to create stream: No such file or directory in /www/c/cxxpmxn/htdocs/cwfm/index.php on line 70

Warning: main() [function.main]: Failed opening 'lang/.php' for inclusion (include_path='.:/usr/local/lib/php') in /www/c/cxxpmxn/htdocs/cwfm/index.php on line 70

Surely someone else must have installed this great script??

Anyone?

- atari

vydra
6-5-03, 11:17 PM
We are working on fixing up that script for powweb. Hopefully will have it working in a week.

atari
6-5-03, 11:20 PM
thanks for your reply vydra,

So is my problem due to something on Powwebs servers?

Can you please let me know when it is complete... thanks!

Also, I was a little confused with the php.ini and httpd.conf files that you have to make yourself... if you could possible inform me of examples (to be used on a powweb server) that would be awesome.


thanks again,

- atari

spiff
6-6-03, 05:59 PM
Hi Atari,

As indicated in the Install file, you need to have several parameters set in your php.ini file. You may copy powweb's file (http://support.powweb.com/tutorials/phpdotini.php), change the 5-6 configuration items indicated in the Install file, then upload it back to the directory where you installed cwfm's php files.

I believe this step should let you access the front page. Then you might run into some other problems, as indicated earlier by vydra. Keep us posted.

Later,
Spiff

atari
6-15-03, 09:01 AM
Thanks vydra and spiff for your replies...

Any update on how the Powweb specific coding is going vydra?

One other question. I have since deleted the cwfm contents, however my ftp program will not allow me to delete the "cwfm" folder. Even if I CHMOD it to everything, I can not delete it?

It is definately empty? How do I remove it, or better still, how long until we can use CWFM as a working script for powwebs servers.

thanks and regards,

- atari

spiff
6-16-03, 07:29 AM
Hello Atari,

Yes, we have Cwfm working on powweb. In order for the software to run on this server's configuration, a number of bugs had to be squashed. Details appear below.

I suggest you try deleting the sticky directory from inside Cwfm; it was impossible to chmod or chown the directory on a shell-enabled server, except after deleting every file from inside Cwfm.

Regards,
Eric

Fixes/Changes:

Double-backslashes in paths: Tree.php seems to generate double-backslashes in variable $iPath, which may be an issue on some systems.
Fix location: Tree.php
Lines 617-618:
Replace the lines:
if( Last($iPath) != "/" )
$iPath .= "/";
with:
if( Last($iPath) == "/" )
$iPath = substr($iPath, 0, -1);
Fix location: Paste.php
Lines 35-38:
Replace the lines:
if( strlen($iPath) <= 1 )
$ip = "";
else
$ip = substr($iPath,0,-1);

with:
if( strlen($iPath) <= 1 )
$ip = "";
else
$ip = $iPath;
Fix location: DirPaste.php
Lines 75-78:
Same as above

Runtime Error: Redirection fails when attempting to download files
Error location: Dw.php
Comments: Origin of this problem not yet understood. It is clear the generated file "/tmp/$sid/df.php" never gets called. Changing the redirection method to pure PHP or <META> tag was to no avail. All I could do was bypass the faulty redirection, so this is by no means a fix.
Uncomment the following lines 95-126:
$fpo = @fopen("tmp/$sid/df.php", "w");
fputs($fpo, "<frameset rows=\"*");
if( $zip )
fputs($fpo, ",*");
else
{
while($i--)
fputs($fpo, ",*");
}
fputs($fpo,"\" frameborder=\"NO\" framespacing=\"0\">\n");
fputs($fpo, "<frame name=\"F\" frameborder=\"NO\" src=\"../../DwTop.php?zip=$zip\">\n");
if( $zip )
fputs($fpo, "<frame name=\"F0\" frameborder=\"NO\">\n");
else
{
for($i=0; !feof($fp); )
{
$s = fgets($fp, 1024);
if( $s == "" )
continue;
fputs($fpo, "<frame name=\"F$i\" frameborder=\"NO\">\n");
$i++;
}
}
fputs( $fpo, "</frameset>\n");
fclose( $fpo );
if( $i )
{
echo "<script language=\"JavaScript\">\n";
echo "document.location='tmp/$sid/df.php'";
echo "</script>\n";
}
Replace with the following code:
echo "<frameset rows=\"*";
if( $zip )
echo ",*";
else
{
while($i--)
echo ",*";
}
echo "\" frameborder=\"NO\" framespacing=\"0\">\n";
echo "<frame name=\"F\" frameborder=\"NO\" src=\"DwTop.php?zip=$zip\">\n";
if( $zip )
echo "<frame name=\"F0\" frameborder=\"NO\">\n";
else
{
for($i=0; !feof($fp); )
{
$s = fgets($fp, 1024);
if( $s == "" )
continue;
echo "<frame name=\"F$i\" frameborder=\"NO\">\n";
$i++;
}
}
echo "</frameset>\n";


Syntax Error: Object Required at startup when loading tree popup menus on the left
Error location: Tree.php
Comments: Type-checking discrepancy: PHP 4.3.1 function is_link(filename) returns true or null. Code assumes the function returns true or false, but this needs to be enforced.
Line 130:
Change
$retVal[$n][1] = is_link($sPath.$file);
to
$retVal[$n][1] = ( is_link($sPath.$file) ? 1 : 0 );


Syntax Error: Object Required when right-clicking on an empty area of the tree.
Error location: Tree.php
Line 726: Change return type of JavaScript function showmenuie5() to: return null;


Display issue with large fonts: Unable to see file selection in upload window
Fix location: MUpload.php
Lines 44-50: Change frameset to:
<frameset rows="30,*" frameborder="NO" border="0" framespacing="0">
<frame name="MUpTopFrame" scrolling="NO"
src="MUploadTop.php?dir=<?echo $dir?>&unz=<?echo $unz?>"
frameborder="NO" marginwidth="0" marginheight="0" >
<frameset cols="*,100" frameborder="NO" border="0" framespacing="0">
<frame name="MUpMainFrame"
src="MUploadBottom.php?dir=<?echo $dir?>&unz=<?echo $unz?>"
frameborder="NO" marginwidth="0" marginheight="0">
<frame name="MUpRightFrame" scrolling="NO" noresize
src="MUploadRight.php?dir=<?echo $dir?>&unz=<?echo $unz?>"
frameborder="NO" marginwidth="0" marginheight="0">
</frameset>
</frameset>
Fix location: File.php
Line 740: In function upload(unz), set w=520 h=200
Fix location: Mainmenu.php function
Line 440: In function UploadField(unz), set w=520 h=200
Fix location: MUploadRight.php
Lines 63-72:
Replace the lines:
parent.MUpTopFrame.scrollBy(0,
<?
if( strstr($HTTP_USER_AGENT, "Netscape6") )
echo "30";
else
if( strstr($HTTP_USER_AGENT, "Mozilla/5") )
echo "32";
else
echo"23";
?>);
with:
parent.MUpTopFrame.scrollBy(0,32);
Line 93: Add <br> tag before table definition

atari
6-16-03, 11:16 AM
I will try again over the next week or so...once I get some time and let you know how I go.

Thanks again.

- atari

atari
6-26-03, 03:28 AM
Okay..

I want to install this again, but I cant delete the /cwfm/data/ directory??

When I try to delete I get:

257 "/htdocs/cwfm" is your current location
RMD /htdocs/cwfm/data
550 Can't remove directory: Directory not empty
PASV
227 Entering Passive Mode (63,251,213,41,186,156)
LIST


When I try to CHMOD the directory to 777, I get

SITE CHMOD 777 data
550 Could not change perms on data: Permission denied
PASV
227 Entering Passive Mode (63,251,213,41,77,102)
LIST


There is physically nothing in the directory? I want to delete and start fresh but I cant?

I have never experenced this before?

- atari

atari
6-26-03, 09:22 AM
I have now given up on trying to get this script to work.

I figure reliability is probably more of a concern than having the zip support (which is what I originally wanted).

I still can not delete the /cwfm/ directory and as for the unistall procedure - well needless to say, it doesnt work (not for me anyway).

I'm now using PHP File Manager (http://phpfm.zalon.dk/) which installs and works great...if only it had zip support.

Anyone else know of a good stable FM that has zip support other than cwfm?

I'm completely stumped trying to figure out how to remove this /cwfm/ directory? :(

- atari

p.s. thanks for your help nonetheless spiff and vydra

spiff
6-26-03, 11:26 AM
Hello Atari,

Don't give up so quickly.

Don't worry about the directories you cannot delete. You may simply copy all Cwfm script files into the existing directory, then follow the install procedure. 'data' and 'tmp' are only there for buffering, so it doesn't matter whether they are preexisting or created afresh by Cwfm.

Powweb's lack of telnet is a problem that can be dealt with using PHP scripts (chmod and delete are built-in functions in PHP). I was just as surprised as you were when getting this chmod error initially.

We have a zip file containing all the changes we made to Cwfm to get it to work (and it DOES work on Powweb).

Later,
Spiff

vydra
6-26-03, 12:25 PM
I've put the fixed-up cwfm here: http://vydra.net/files/
Good luck
David

atari
6-26-03, 07:59 PM
Hey Spiff and Vydra..


Thanks for the files (I've just finished uploading).

Two Questions:

1. The system/manager password doesn't allow me to initally log in (but it does already look better than my installation :D)

and,

2. If either of you could tell me what CHMOD number that individual directories and files have to be, that would be great.

Thanks again for your time.

- atari

spiff
6-27-03, 07:08 AM
Aha, trouble. Have you installed it in the same location as before? You might have to place it in a fresh folder after all, since the data folder exists and is empty, Cwfm expects the login/pwd file to be present in it.

Once it's up and running in a different dir, I think you'll just have to point a workspace to the old folder to be able to delete it.

CHMOD 550 means only the owner and group may modify this folder/file, no public user. Cwfm declares its own user and group ownership, so you're not recognized as having the proper privileges. It'd have to be public (at least 555) in order to let itself be deleted.

Later,
Eric

atari
6-28-03, 01:17 AM
Thanks spiff.

I reinstalled to a fresh folder and it worked.

I now finally have cwfm working (who would have ever thought!) and I finally got the uninstall script working on my old folder...it was my own fault - I wasnt explicity listing the directory.

So thanks heaps for your time Spiff and vydra...

After all that, I think I still prefer PHPFM better, however I havn't given cwfm a real opportunity to impress me yet.

Thanks heaps guys!...Powwebs forums make getting help easy.

- atari

petreza
7-15-03, 06:18 PM
Hi,

I am trying to install cwfm from vydra (above) but because I am complete newbee I can't get it to work. I got php.ini from powweb and followed the instructions from the "Install" file - whatever options it said to turn on/off were already set up correctly in php.ini . I am having trouble with httpd.conf - there is no such file with powweb so I have to work with .htaccess - but I don't know what exactly to put there.

If you could, please post the steps you did in order to get cwfm to work. I would greatly appreciate it!

( Could it be that I am still using the temproraly URL to get to my site? - http://rarelistingscom.powweb.com/cwfm ?

Thank you!

spiff
7-15-03, 07:10 PM
Hello Petreza,

You shouldn't have to mess with httpd.conf or .htaccess. I didn't have to trouble with those to get cwfm to work. Scratch everything you did with these two files (and .htpassword as well).

I'm not able to see the root of your site either (I'm getting "cannot find server" errors), so it may be that your htaccess locks have been made so restrictive that no one is able to see anything. A zero-length index.php file in your htdocs root effectively displays a blank page, and may be a better way to hide things while you're building up your contents.

Also verify the path where you placed cwfm. Forgive me if I'm stating the obvious, but any web content must be placed inside the /htdocs directory, which is the "world-wide web" area of your powweb account; this means that in order for cwfm to be visible as yoursite.powweb.com/cwfm/, it must appear in $ROOT/htdocs/cwfm/ under your ftp client.

Let us know how it goes,
Eric aka Spiff

petreza
7-15-03, 07:26 PM
I am currently having a problem with something else too and I got a responce from someone else here saying that a lot of things don't work until my website is accessable through my domain name directly. Right now it is accessable only through rarelistingscom.powweb.com . So I will wait until that is fixed and if I still have a problem with cwfm I will post again.

Thanks!

petreza
7-16-03, 10:13 AM
OK

My site and CWFM are working fine now. Two questions:

1. In the "Install" file it says:

optionally you can restrict access to cwfm area with:

<Directory /var/www/cwfm>
AllowOverride None
order deny,allow
deny from all
allow from <allowed-network>/<netmask>
</Directory>

do I have to bother with any of these options - am I taking a security risk if I don't set them up?

2. A little lower it says:

Under Unix/Linux Reload Apache (normally with /etc/init.d/apache reload)

should I ignore this?


Thank you!

petreza
7-16-03, 10:20 AM
one more:

3.
"Zip Path is the complete path
to 'zip' program. If you want to use 'Zip$Download' feature you must have
'zip' installed and give Cwfm the right path to.Unzip Path is the complete
path to 'unzip' program. If you want to use 'Upload&Unzip' feature you must
have 'unzip' installed and give Cwfm the right path to.

Zip and Unzip are free tools that normally come with your distribution.
Windows user can find them at http://www.info-zip.org."


How exactly do I get ZIP support for CWFM ?
If I want to make a backup for my website by zipping and downloading everything, will I not use too much processing power of the server while zipping and will Powweb shut me down?

Thank you!

petreza
7-16-03, 11:00 AM
And yet one more:) :

4. When I setup a user that is supposed to see only folder /htdocs/folder1/ , what do I type under "Root directory 1" ?

I tried:

/htdocs/folder1/
/$root/htdocs/folder1/

none of them worked:
I uploaded a file with FTP to /folder1/ but when I login as the user it shows me an empty folder. If I try to create a file while loggedin as the user and I press "Save" it says "Cannot create file"

:( :( :(

Please help!
Thank you!

spiff
7-16-03, 12:41 PM
My site and CWFM are working fine now.
Yea! :-)

On to your flurry of questions:

1. Yes, this is an extra security layer you may set up in order to allow only specific users access to the CWFM directory. I've never used it, and I think you may safely skip it.

2. Naah, you don't need to reload.

3. Linux executables usually live under /usr/bin/. See http://forum.powweb.com/showthread.php?s=&threadid=8638&highlight=zip. All you need to do is set up the proper path to the gzip and gunzip executables.

Don't worry about processing power. And if you exceed your storage, they'll simply charge you ;-)

4. Your space on Powweb's server is located under /www/<login-initial>/<login>/. Your space should therefore lie under "/www/r/rarelistingscom/".

I suggest you place your vital data in a dir at the root of your account space, rather than in the publicly-accessible /htdocs directory.

Up, up and away,
Spiff

petreza
7-16-03, 01:30 PM
when I go to the user setup screen and I press "Browse" next to "Root directory 1" and I go to:

/www
/r

I do not see my site "rarelistingscom" underneeth - I do see a bunch of other sites with "r" but not mine:(

maybe "Browse" is looking at the wrong server or something.

even if I just type

/www/r/rarelistingscom/htdocs/folder1/

or

/www/r/rarelistings/htdocs/folder1/

it still does not work:(

aaaagh!!!

PS all the sites under "r" do not have "com" or anything else appended - but that does not help me either

petreza
7-16-03, 01:52 PM
The only time it somewhat works is if I type "folder1/" under "Root directory 1" and I move folder1 inside the cwfm folder

but even then I cannot download/upload/modify/create files inside folder1 eventhough I can see the files that are already there (permissions to both the folder and the files are set to 777)

spiff
7-16-03, 02:01 PM
4. Your space on Powweb's server is located under /www/<login-initial>/<login>/. Your space should therefore lie under "/www/r/rarelistingscom/".

If rarelistingscom is indeed your powweb login :D

Spiff

petreza
7-16-03, 02:45 PM
Thank you spiff!!!!!

Thank you! Thank you! Thank you!


I finally got it - LOGIN - duhhhh - not my domain; not my OPS login; but the login I use for FTP. Works fine now as far as reading, writing, editting, saving, moving, copying, downloading, uploading.

However I still have some questions:

1. I can't get zipping to work. For the path I tried:

/usr/bin/

and

/usr/bin/gzip

none of them worked. When I select a file and click "Transfer" -> "Zip&Download" a message pops up saying "Unable to open one or more selected files" :( What exactly should I type for the path?
(maybe I should try tar ?)


2. You recomend that I do not put my files inside "htdocs" because they are publicly accesable. But the user that I setup is going to upload some website content to "folder1" under "htdocs" which will be his homepage - I will use "Redirect" - one package multiple websites.
I guess in that case I will have to ignore your coment. Should I?


3. Provided my explanation about "folder1" in 2. (above), what permission settings should I setup for that folder. Currently it is 777.


I am sorry that I am such a botter. Thanks for your help!

spiff
7-16-03, 05:28 PM
No sweat.

1. I haven't used Cwfm's ability to zip files, nor did I test it for potential bugs. Cwfm's tweaked version (which you downloaded) might therefore still contain bugs I wasn't paid to solve...

2. My recommendation held for sensitive data. If you're planning on using the script to upload/download web stuff, you should definitely place these folders in the public area.

3. As you may have already found out, cwfm takes care of ownership issues. Leave it as 777.

Later,
Eric

spiff
7-16-03, 06:32 PM
Okay, the paths should read:

/usr/bin/gzip
/usr/bin/gunzip

But it's not working.

This may have to do with powweb not having telnet access. It might be possible to use php commands to zip/unzip, but I'm not sure I'll have the time to look into that.

Spiff

petreza
7-16-03, 07:24 PM
Thank you spiff! You were very helpfull to the poor, defenceless newbee petreza. I wish more people were as patient and generous as you are......
(Hey, you helped me. The least I can do is tickle your ego a bit. :D )

As you said the zip/unzip thing does not work but that is not that important. I can always multi-select everything download and zip locally.

Again, thank you very much!

spiff
7-17-03, 12:29 PM
Hey, no problem.
Hope everything works out perfectly for you.
Later,
Patient and Generous Spiff :D

djsherif
1-13-05, 06:36 PM
Hi Spiff,

You seem to know quite a bit about CWFM so I got a question for you. I am unable to deleter folders, I can create and delete files but not folders. I can also not rename folders. Do you have any idea what this could be?


TIA

spiff
1-16-05, 06:56 PM
Whoa. 18 months. That's a long time since I last posted to this thread :rolleyes:

Practically haven't logged into powweb since then, but I remember deletion of folders was problematic. Even on a shell-enabled server, I had to log in as root to be able to delete folders.

IIRC, the workaround I had found was to create another workspace CONTAINING the folder you're trying to delete, and delete it from there.

I can't remember whether Cwfm is still supported; there's some activity on SourceForge, but there hasn't been a release in a long while (since 0.9.1, and it needed work to make it click on Powweb...).

Have you looked at Owl (http://sourceforge.net/projects/owl/)? You may find better support with that one, but I haven't tried it on Powweb.

Hope that helps,
Eric

jaumesb
7-17-05, 07:44 PM
Another option recently launched, with a different approach, is WebbyFiles. It tries to be very easy to use and thus it does not have some of the Cwfm features. Instead, it implements a folder-based, database-driven permission system, independent of system permissions, which I think is much easier to understand and use for the average non-techical user. You can try it at the full featured on-line demo :

http://www.webbyfiles.com/demo.en.php

It's commercial, but includes the source code that can be modified at wish (I am the author).

spiff
7-17-05, 08:36 PM
Looks clean.
Does the upload have a progress monitor?
-e

RTH10260
7-17-05, 09:36 PM
Yet another File Manager


http://phpatm.free.fr/

jaumesb
7-23-05, 04:35 PM
The ulpload progress monitor is in the to-do list for the next version of WebbyFiles. I expect to have it by the end of 2005, but it can be sooner if some client requests it specifically. If a client asks for this or some other feature not yet implementent but already scheduled, I provide the upgrade for free as soon as it is available.