Koozali.org: home of the SME Server

Allow Wirte Access to I-Bay Account

Amazing Iceman

Allow Wirte Access to I-Bay Account
« on: September 11, 2003, 12:30:19 AM »
Is there a way to allow an I-Bay Account write access write? By default, SME only allows Read Access to an I-Bay Account.

Dan Brown

Re: Allow Wirte Access to I-Bay Account
« Reply #1 on: September 11, 2003, 12:35:47 AM »
Yes, you set up the ibay to allow write access in the server manager.  It's all in TFM.

Amazing Iceman

Re: Allow Wirte Access to I-Bay Account
« Reply #2 on: September 11, 2003, 01:06:25 AM »
Maybe I got misunderstood...
This is what I'm trying to accomplish.

I want to setup an i-bay (let's call the I-Bay: uploads and the password: cats)

I want to allow some people on the internet to connect to the I-Bay via FTP and upload files, but I don't want to create a user account for each individual, I just want to give them to login using:
Username: uploads (the name of the I-Bay)
Password: cats       (the password for the I-Bay)

Currently, they only have read access to the I-Bay; I want them to have write access as well. And I don't want to create a user account because I will need to give all users ftp access and that's not safe to do...

On the contrary, a single I-Bay with read/write access via FTP would be safe for my purposes.

Bill Pflaumer

Re: Allow Wirte Access to I-Bay Account
« Reply #3 on: September 11, 2003, 02:45:25 AM »
Goto http://www.webfilebrowser.org/ and try this simple php script. It has it's own Login dialog, so set your ibay for group:everyone, Group =RW, Internet:no password , dynamic content:enabled. Go thru the script to your liking and read the documentation. I set my php.ini to 25 MB. I love this script. You can make as many Ibays as you wish by copying the script into a different ibay and change the username and password in the script. BTW, the Username does not need to be the same name as the Ibay. I have been using this script for over a year, it's great for field service, ALL your tools are available at a click of a mouse. I got to go, I see he updated the script and need to read all about.

I doubt the username password is encrypted, I need to check, but either is ftp.

Bill

Bill Pflaumer

Re: Allow Wirte Access to I-Bay Account
« Reply #4 on: September 11, 2003, 02:56:05 AM »
Amazing Iceman

May I add to my above post. NO FTP Client Needed and the username/password you choose do not need to be addes to the sever user accounts.

Bill

Michael Smith

Re: Allow Wirte Access to I-Bay Account
« Reply #5 on: September 11, 2003, 04:49:31 AM »
There's also the webshare contrib ...

Amazing Iceman

Re: Allow Write Access to I-Bay Account
« Reply #6 on: September 12, 2003, 05:39:27 AM »
Thanks for your great suggestion, Bill.
I have installed it, and checked the program code, and it looks great.
I only have a problem uploading files. I keep getting this error:

Upload of file filename.ext aborted

I have checked the php.ini file and it complies with the requirements. I have even tried with very small files (1KB) and th problem is the same.

Do you have any idea why it doesn't work?
Could it be a bug in this latest version?

I'm using SME Server 5.6, by the way.

Thank you..

Bill Pflaumer

Re: Allow Wirte Access to I-Bay Account
« Reply #7 on: September 12, 2003, 08:29:53 AM »
Can you at least create a folder ? Chk permissions ? I will try to install the lastest script on a SME6B3 tomorrow, but I have no trouble from a server that started as a 5.1.2 and upgraded to SME 6B3. Check back at the website and read the FAQs. Once you get this going, you will be quite happy with it. Report back your findings!

Bill

Mark Thomas

Re: Allow Wirte Access to I-Bay Account
« Reply #8 on: September 13, 2003, 02:24:16 AM »
Bill, thanks for this one! Very nice.

I'm having the same problem as iceman, I can create a dir, file and even delete them, but I can not upload. *shrug*

I'm using 6beta3

BTW, does anyone know of a good tutorail for making custom-templates? I have read what I can find, but it doesn't sink in. I would like to make a custom-template for the php.ini.

Bill Pflaumer

Re: Allow Wirte Access to I-Bay Account
« Reply #9 on: September 13, 2003, 11:44:40 PM »
NOW  I REMEMBER. I installed the lastest Version of webfilebrowser to a SME6B3 box and it failed the same way you guys described. YOU NEED to disable the PHP SANDBOX introducted in V5.1.2. I don't have time to do this today (Party) but if one of you guys can do a search on this site for 'php sandbox' to disable it and report your findings.

Thanks

Bill

Mark Thomas

Re: Allow Wirte Access to I-Bay Account
« Reply #10 on: September 14, 2003, 05:26:00 AM »
Bill, you did it again! That seems to have solved the problem. I can now upload files.

While searching I found this by Han;

These scripts use copy to transfer the files from the /tmp directory to the ibay. If you replace copy by move_uploaded_file it works without disabling the security feature.

link:
http://forums.contribs.org/index.php?topic=17023.msg66025#msg66025

Anyone know were to find this in the config files?

Also, it appears that I have succesfully created my first /custom-template/  !

Bill Pflaumer

Re: Allow Wirte Access to I-Bay Account
« Reply #11 on: September 14, 2003, 07:34:20 PM »
I followed the Disable PHP Sandbox HowTo here http://www.e-smith.org/bboard//read.php?f=3&i=11473&t=11473 . Follow it to the letter (even the period after the 95Add* .)

Bill

Ian

Re: Allow Wirte Access to I-Bay Account
« Reply #12 on: September 15, 2003, 01:24:44 AM »
It tells me to make it session based i need the PHP session management feature activated.   How do i activate it and set up usersBill Pflaumer wrote:
>
> Goto http://www.webfilebrowser.org/ and try this simple php
> script. It has it's own Login dialog, so set your ibay for
> group:everyone, Group =RW, Internet:no password , dynamic
> content:enabled. Go thru the script to your liking and read
> the documentation. I set my php.ini to 25 MB. I love this
> script. You can make as many Ibays as you wish by copying the
> script into a different ibay and change the username and
> password in the script. BTW, the Username does not need to be
> the same name as the Ibay. I have been using this script for
> over a year, it's great for field service, ALL your tools are
> available at a click of a mouse. I got to go, I see he
> updated the script and need to read all about.
>
> I doubt the username password is encrypted, I need to check,
> but either is ftp.
>
> Bill

Ian

Re: Allow Wirte Access to I-Bay Account
« Reply #13 on: September 15, 2003, 02:00:43 AM »
I am able to now upload buyt It is giving me the message now unable to move file to trash can any help?

Ian

Re: Allow Wirte Access to I-Bay Account
« Reply #14 on: September 15, 2003, 02:22:41 AM »
Ian wrote:
>
> I am able to now upload buyt It is giving me the message now
> unable to move file to trash can any help?

I got my too problems I post earlier resolved now I am having one last problem I can trasfer a file small file 2mb or less but anything over that I get page can not be displayed  Can some on help me I want to set the max transfer too a 1Gb in the php.ini and in the app can some one tell me where i need to update these?


Please I wont post any more questions after this

Ian

Re: Allow Wirte Access to I-Bay Account
« Reply #15 on: September 15, 2003, 02:56:43 AM »
One other problem since i put the  # infront of the sandbox things i get this when i try to access server manager


Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /server-manager/.

Reason: Could not connect to remote machine: Connection refused

Ian

Re: Allow Wirte Access to I-Bay Account
« Reply #16 on: September 15, 2003, 04:23:15 AM »
Ian wrote:
>
> One other problem since i put the  # infront of the sandbox
> things i get this when i try to access server manager
>
>
> Proxy Error
> The proxy server received an invalid response from an
> upstream server.
> The proxy server could not handle the request GET
> /server-manager/.
>
> Reason: Could not connect to remote machine: Connection refused

Disregard i needed to reboot

Bill Pflaumer

Re: Allow Wirte Access to I-Bay Account
« Reply #17 on: September 15, 2003, 08:46:18 AM »
Ian,
I can help you get through the php upload limitations, but you need to do something for me. First, come down off your speedball and stop leaving 4 billon posts on this forum. Second, is Research,Research and Research. I have no problem uploading 50MB files using this script but the answer did not walk through the door .

Talk to you tomorrow,
Bill

Ian

Re: Allow Wirte Access to I-Bay Account
« Reply #18 on: September 15, 2003, 04:42:36 PM »
Bill,  Thanks for the advise on the speedball problem of mine.  Secondly I have researched both here and on the makers website and can not find the answer to my problem (maybe you know someplace I dont).  Please look at my other post on the board I have posted my INI file and my PHP file for trouble shooting.  Thanks in advance.

Amazing Iceman

Re: Allow Wirte Access to I-Bay Account
« Reply #19 on: September 15, 2003, 11:52:46 PM »
Thanks again, Bill...

Just one question: What are the side-effects for disabling the PHP Sandbox?

I imagine that there must be a reason why it was implemented, and if we are disabling it, something else may stop working.

The script seems to be very well written. Now we just need someone capable of writing a plug-in for the Server Manager for easier management.

Thanks to everyone who posted their replies to my messages.

-- The Amazing Iceman

Amazing Iceman

Re: Allow Write Access to I-Bay Account - PROBLEM SOLVED
« Reply #20 on: September 16, 2003, 12:13:02 AM »
Hello Everyone,

Thanks to all the infomation you provided in your posts, I was able to modify the script to solve the problem.

Here's what you need to do:

1) Open the script in vi
2) Go to line 1148 and only change @copy to @move_uploaded_file.
3) Save the script, and it now works...

I will keep testing the script, and if I run into errors I will post them here.

Thanks again,

-- The Amazing Iceman

Mark Thomas

Re: Allow Write Access to I-Bay Account - PROBLEM SOLVED
« Reply #21 on: September 16, 2003, 02:41:00 AM »
iceman, are you referring to the 'webFileBrowser.php file ??

if so, mine is as follows;
1146 if (@copy($HTTP_POST_FILES["file"]["tmp_name"], $fp)) {
1147 @unlink($HTTP_POST_FILES["file"]["tmp_name"]);
1148 @chmod($fp, $filemode);

Amazing Iceman

Re: Allow Write Access to I-Bay Account - PROBLEM SOLVED
« Reply #22 on: September 16, 2003, 04:07:21 AM »
Yes, I'm referring to the 'webFileBrowser.php file. I renamed mine to index.php and renamed the original index.html file that appears when you create an ibay.

I'm trying to fix the MaxUploadSize values, it seems that there's more than one place that needs to be changed.

Amazing Iceman

Re: Allow Write Access to I-Bay Account - Download issue on
« Reply #23 on: September 16, 2003, 04:46:06 AM »
Guess what.... On SME 6.0 I cannot download files. I can Upload, but not download...

Very strange... PLease let me know if someone else is having problems with 6.0.

Thanks

Mark Thomas

Re: Allow Write Access to I-Bay Account - Download issue on
« Reply #24 on: September 16, 2003, 05:46:25 AM »
I'm using 6beta3 and I can D/L and U/L, but  only small files, less than 1MB.

I created a custom template for the php.ini file and changed the '60FileUploads' to this.
'UploadMaxFilesize') || "10M";

I also changed the webFileBrowser.php file to this.
$uploadmaxsize = 10485760

but still no luck *shrug*

Bill Pflaumer

Re: Allow Write Access to I-Bay Account - Download issue on
« Reply #25 on: September 16, 2003, 04:21:42 PM »
The following quote is from a Charlie Brady Howto to increase the size of webmail attachments and other PHP apps. It came with an RPM to install, but fails to install on SME6B3 because of version conflicts. I entered the following without the RPM install and worked for me.  



Add these settings into the configuration database to increase the maximum attachment size to 25MB:

/sbin/e-smith/config setprop php MaxExecutionTime 1800
/sbin/e-smith/config setprop php MemoryLimit 100M
/sbin/e-smith/config setprop php PostMaxSize 25M
/sbin/e-smith/config setprop php UploadMaxFilesize 25M

Expand the template:

/etc/e-smith/events/actions/conf-php

Then restart httpd:

/etc/rc.d/init.d/httpd-e-smith graceful

Ian

Re: Allow Write Access to I-Bay Account - Download issue on
« Reply #26 on: September 17, 2003, 07:22:45 AM »
Expand the template:  (what need to be done once you expanded it)

/etc/e-smith/events/actions/conf-php

Then restart httpd:

/etc/rc.d/init.d/httpd-e-smith graceful (what does graceful mean here)

I am not new to sme but I am quite confused as to what is ment by these four lines coudl someone please explain it to me in laymens terms and exactly what i need to do

Amazing Iceman

Re: Allow Write Access to I-Bay Account - Download issue on
« Reply #27 on: September 17, 2003, 06:17:33 PM »
This is what I did:

1) Copy the following templates from the /etc/e-smith/templates/etc/php.ini/ directory to the /etc/e-smithtemplates-custom/etc/php.ini/ directory:

20ResourceLimits
40DataHandling
60FileUploads

2) Open each template and edit the following values as you find them:
max_execution_time 1800
memory__limit 100M
post_max_size 25M
upload_max_filesize 25M

3) Expand the php.ini template by typing:
/sbin/e-smith/expand-template /etc/php.ini

4) The most important task:
Restart the httpd service, or if you don't know how, reboot your SME Server.
I learned the hard way that none of your changes would take effect until you restart it.
If you choose to restart the httpd service, you may also need to start the httpd-admin service; I noticed that it doesn't come un by itself (but I could be wrong about this).

Thanks to everyone who helped. This script is really nice...
Someone with PHP skills please write a front end to manage users, rights, and other necessary tasks. I started learning PHP but had to stop, because I had other priorities. But no doubt, PHP rulez!

Mark Thomas

Re: Allow Write Access to I-Bay Account - Download issue on
« Reply #28 on: September 18, 2003, 04:36:36 AM »
So far this is what I have done to get 'webFileBrowser'
(http://www.webfilebrowser.org/) working, *somewhat*, on SME
6beta3.

To enable uploads I changed @copy to @move_uploaded_file on
line 1146 in the webFilebrowser.php file.

 if (@move_uploaded_file($HTTP_POST_FILES["file"]["tmp_name"], $fp)) {

To *try* to enable file upload sizes larger than 2MB I added
/php.ini to the templates-custom area.

etc/e-smith/templates-custom/etc/php.ini

I then added the following files to it.

 20ResourceLimits
 40DataHandling
 60FileUploads

I edited each one changing the values below.
 
MaxExecutionTime 1800
MemoryLimit 100M
PostMaxSize 25M
UploadMaxFilesize 25M

I restarted httpd with
service httpd restart
(I also rebooted the server)

I tried changing the value of 'uploadmaxsize' in the
webFileBrowser.php file to 2621440.

I also performed these commands. Which appear to edit the
php.ini file itself.
/sbin/e-smith/config setprop php MaxExecutionTime 1800
/sbin/e-smith/config setprop php MemoryLimit 100M
/sbin/e-smith/config setprop php PostMaxSize 25M
/sbin/e-smith/config setprop php UploadMaxFilesize 25M

Expand the template:  /etc/e-smith/events/actions/conf-php

So far I am *unable* to upload files larger than about 1M.

Note:
I have another 'webshare' installed which *will* accept
uploads of 25M or less.

p.s.
In the docs I read (http://www.e-smith.org/custom/) it said;
--
Expand the template:

     /sbin/e-smith/expand-template /etc/smb.conf

When you've finished, the new changes will appear in the /etc/smb.conf file
--

If that's the case, shouldn't changing the values in the
templates-custom/php.ini/ change the etc/php.ini file?

Amazing Iceman

Re: Allow Write Access to I-Bay Account - Download issue on
« Reply #29 on: September 18, 2003, 08:48:47 AM »
You didn't need to use this commands I you use the templates:

/sbin/e-smith/config setprop php MaxExecutionTime 1800
/sbin/e-smith/config setprop php MemoryLimit 100M
/sbin/e-smith/config setprop php PostMaxSize 25M
/sbin/e-smith/config setprop php UploadMaxFilesize 25M

And I think you made a mistake here:
"I tried changing the value of 'uploadmaxsize' in the
webFileBrowser.php file to 2621440."   <== This is about 2.4 MB, not 26MB !!!


Check your /etc/php.ini file, make sure that the parameters were properly changed by the templates. If you have duplicates, then something went wrong.
Copy again the template, and change the values again; maybe you deleted something the first time. Even a missing ";" could cause the template to fail.

- Mine seems to be working good. I want to experiment with really large files, and tweak PHP to allow resuming file transfers in case of a communication failure.
I want to try 700MB files to see what happens.

Amazing Iceman

Re: Allow Write Access to I-Bay Account - Download issue on
« Reply #30 on: September 18, 2003, 08:59:26 AM »
Can Webmail uploads still be restricted to a smaller size than specified on php.ini?

The whole idea for installing WebFileBrowser was to overcome the 10MB email size limitation that most servers have, by keeping the maximum allowed attachment size to about 4MB, and enforcing the use of WFB for larger file transfers.
But by making the changes to php.ini to increase the max_upload_size parameter and other parameters related to this case, if a user tries to send - for example - a 20MB file via webmail, the server will retry sending the message over and over, potencially bringing the server to an unstable state.

If there's a way to limit the message size on Webmail (both the regular e-mail and the groupware e-mail), this problem could be avoided.

Also, what would happen if I change the memory_limit parameter on php.ini to a very large number? Will it take all of the server's memory and crash it?

What if more than one person tries to upload at the same time and the sum of both uploads is larger than the memory_limit ?

Thanks,

John

Mark Thomas

Re: Allow Write Access to I-Bay Account - Download issue on
« Reply #31 on: September 18, 2003, 02:34:53 PM »
iceman, what is the error message you get when you try and upload a file larger than the limit set in the php.ini? Mine says "document contains not data"

Also, if I change anythig in the custom template it does *not* change the php.ini file. So maybe that is the problem. Or is it suppose to?

I am truly confussed at this point.

Bill

Re: Allow Write Access to I-Bay Account - Download issue on
« Reply #32 on: September 18, 2003, 04:52:00 PM »
For any change to the template to be activated you need to issue the command

/sbin/e-smith/expand-template /etc/php.ini

followed by

service httpd restart or a reboot.

Ian

Re: Allow Write Access to I-Bay Account - PROBLEM SOLVED
« Reply #33 on: September 21, 2003, 02:27:54 AM »
I am throughyl lost.  I have tried everything that you guys suggested above and I am still unable to uplaod a file greater then 1mb.  I have tried icemans fixes and I have disable the sandbox.  I am throughly lost and about to give up

Mark Thomas

Re: Allow Write Access to I-Bay Account - PROBLEM SOLVED
« Reply #34 on: September 21, 2003, 02:45:55 AM »
I know how you feel Ian It seems as though you and I are the only ones with the 1MB problem. I'm thinking is has something to do with another package that we have installed.

Mark Thomas

Re: Allow Write Access to I-Bay Account - use IE instead
« Reply #35 on: September 21, 2003, 09:00:20 AM »
Ian, I know what works now. Are you by chance using Firebird as your browser? I just tried uploading a larger file with Internet Explorer and it *worked* . Figure than one out!

One a side note, I'm not able to delete the large file I just uploaded, more testing......

Mark Thomas

Re: Allow Write Access to I-Bay Account - use IE instead
« Reply #36 on: September 22, 2003, 02:04:53 PM »
It has nothing to do with the Firebird browser, it has everything to do with the proxy I was using in Firebird.

Ian

Re: Allow Write Access to I-Bay Account - use IE instead
« Reply #37 on: September 25, 2003, 04:41:40 PM »
That has not solved my problem.  But thanks in advance.