Jump to content

Multi-user Webui-Shell


Lord Alderaan

Recommended Posts

@midnight_talker: You can use the command it again. It should say "This module is already enabled!". Make sure. Because the error you get when you goto /gui/ means the rewriter isn't working properly.

Then go make sure you didn't make any typos when you wrote the RewriteEngine/Rule lines. Then make sure it is in the right place (it should be directly below the DocumentRoot line).

@vdyy:

First, it's probably not a webui problem. It's probably a debian/php/apache problem.

Your php.ini has a line that begins upload_tmp_dir, you must specify the folder when Apache/php should temporarily save files that are uploaded through HTML forms.

If the folder specified there doesn't exist or if the Apache user doesn't have write permissions then Apache/php can't handle file uploads at all, and because the Webui Shell depends on Apache/php it can't either.

So open your php.ini, find the line I am talking about and make sure the folder specified exists and that the Apache user has read and write access.

Link to comment
Share on other sites

  • Replies 540
  • Created
  • Last Reply

Ok, so:

admin@xxxxx:~$ a2enmod rewrite
This module is already enabled!

I checked for typos even through i did it with copy paste..

But when i tried to restart apache:

 * Restarting web server apache2                                                
httpd (pid 7151?) not running
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[fail]

so i did it with sudo and it worked!!

now i logged in and i'm getting this:

{"build":"0","error":"SHELL: Configuration error: This user has no valid instance."}

btw how do i use a different port? If i just enable a different port from utorrents setting under Webui, will that work?

Link to comment
Share on other sites

You would have to change the port for Apache in the Apache config.

If you simply want to change the µTorrent port for some reason this is no problem at all (it won't affect normal users of the Webui Shell), just make sure you also change it in the instance page of the webui shell or the Webui Shell won't be able to talk with µTorrent.

Download files works by enabling it for that user and by filling in the torrentdir exactly as explained in paragraph under the "Allow_Downloading_Files".

Link to comment
Share on other sites

I have configured the upload_tmp_dir in php.ini but it still gives me the same error message. Probably this is because the write /read access so how do I set the php or apache to allow the access to write / read into the directory specified?

Link to comment
Share on other sites

OK, so there is a problem.

When i got it working i already had some files and they were available from Download files. Now I've downloaded some more and from different users to. What already existed and was accessible is still there BUT everything new doesn't become available to no one..

I don't know anything about programming but maybe something to do with cache, or something?

I did Ctrl+F5 nothing.

P.S. I use Firefox.

Link to comment
Share on other sites

Normally a user can only download the torrents he can see in the list.

You could enable Show_All_Torrents for a user. This way the user can see all torrents (and thus download them).

Right now you might have enabled Show_Unclaimed_Torrents for the user. This way the torrents that were pre-loaded (and thus unclaimed by any user) are visible (and thus downloadable) to the user while torrents added by other users (and thus claimed) are not visible.

@vdyy:

Probably chmod or change the owner of the dir to something. I only have basic knowledge of Linux.

Link to comment
Share on other sites

The problem has been resolved and thank you so much. Actually your solution is true, i set the webui_shell directory with chown to www-data:www-data and voila, the torrent can be uploaded without any problem.

But now I got one more problem, about setting the user directory to save the downloaded file. What is the default directory of the downloaded files? If I leave this option blank, where are exactly the files will be saved to? Because when I set the option to for example something like "/user1/", the webui showed me some error messages even though I had made a folder into "/www/webui_shell/user1/". How do I solve this problem? Where should I make "/user1/" folder into?

But one more time thank you for the solution.

Link to comment
Share on other sites

The default directory for downloaded files is set in the preferences of µTorrent itself. Preferences -> Directories -> "Put new downloads in:".

The torrentdir you can set for a User in the Webui Shell Admin Panel is only so that the Webui Shell knows where to find the downloaded files. This is needed for the "Allow_Downloading_Files" and the "Allow_Diskspace_Info" options.

Link to comment
Share on other sites

hye,

shared webserver specifications:

Apache version : 2.0.63
PHP version : 5.2.9
MySQL version : 5.0.81-community
Architecture : x86_64
Operating system :Linux

installed the webui_shell.rar on my shared linux webserver. then editted the config.php

my webserver's apache file can't editted coz it's running on shared linux server.

so downloaded the http://cdlist.mine.nu/webui_shell/webui_shell.no_rewrite.rar and extracted the gui folder. on trac it's says....

Extract the archive to the root of your webserver.

This should create a gui folder with a lot of empty files and a .htaccess file.

This should also add rewriter.php to the webui_shell folder.

there was no rewriter.php files in that rar and i found it at here... http://trac.utorrent.com/trac/browser/webui/webui-shell/branches/no_rewrite/webui_shell/rewriter.php

once i added the rewriter.php into the webui_shell folder..... when i try www.******.com/gui ...... it's giving this error again.... :( :( :(

Configuration error: You are not going through the rewriter or the altname is incorrect.

You should use /gui/.

should i edit the rewriter.php ? or what could be the prob.... someone plz help me

Link to comment
Share on other sites

Thx for the information. I thought that the user directory is the directory in which downloaded files is saved.

Now I got a new problem, when I logged in into one of the user created in webui. I got this following problem :

Configuration error: Blocked by ipfilter.dat OR cURL error: Empty reply from server (52)

What is the cause of this problem?

I also have looked for ipfilter.dat but there is no file called ipfilter.dat in my server.

Link to comment
Share on other sites

  • 3 weeks later...

i get this error now: Fatal error: Call to undefined function mysql_connect() in C:\Program Files\webui_shell\www\webui_shell\inc\adodb5\drivers\adodb-mysql.inc.php on line 363

MySQL Server is on a VPS (OS: CentOS) but its on my dedicated server

port 3306 is open so it should work

anyone know the problem?

Link to comment
Share on other sites

  • 1 month later...
Hi, can someone help me with a tutorial for install webui shell on a fedora server?

Thank you

Most of the Instructions I wrote for Ubuntu is transferred over to fedora.

Notable Changes:

[ul]

[li]Instead of apt-get use yum[/li]

[li]apache is called httpd in yum[/li]

[li]change php5 to php[/li]

[li]/etc/apache2/sites-enabled/000-default becomes /etc/httpd/conf/httpd.conf[/li]

[li]don't worry about the userdir module section[/li]

[li]/etc/init.d/apache2 becomes /etc/init.d/httpd[/li]

[/ul]

That should be most of the changes in fedora - personally I haven't used Fedora (or any other RPM based linux) so I cannot say for sure if that works.

If yum moans saying package doesn't exist you may need to add another yum repository

Link to comment
Share on other sites

  • 1 month later...

Hi there. I've got the shell running fine on a LAN machine. And I've successfully changed the URL to be /utorrent/ instead of /gui/ by editing the $cfg['altname'] option in config.php, and in the httpd.conf RewriteRule line.

However what I'm trying to accomplish is to reverse proxy to the webui running on this machine from my dedicated webserver machine, which also runs Apache.

So, in my webserver's https.conf I have this:

    <Location /personal/utorrent/>
ProxyPass http://utorrent.machine.IP/utorrent/
ProxyPassReverse http://utorrent.machine.IP/utorrent/
</Location>

It redirects properly to the shell's login page, but when I login using the one user I made, it redirects me to www.mydomain.com/utorrent/, which is not a valid directory on my webserver, but obviously is on the torrent machine. It should be keeping the /personal/utorrent path.

Any ideas? I'm not sure I truly understand how to configure the proxy stuff I guess. Thanks. Love the shell BTW, even though I didn't intend to use it for ANYTHING other than the simple /gui/ URL-changing feature ;]

EDIT: I found that it works if I use:

    <Location /utorrent/>
ProxyPass http://utorrent.machine.IP/utorrent/
ProxyPassReverse http://utorrent.machine.IP/utorrent/
</Location>

instead of <Location /personal/utorrent/>

So I tried changing all three configs (config.php, httpd.conf, and my webserver's httpd.conf) to all use /personal/utorrent/ instead of /utorrent/ but it still wants to redirect me to www.mydomain.com/utorrent/ for some reason. And yes I've been restarting uT and both Apaches each time I make a change (although it doesn't seem as though uT needs to be restarted).

So it would seem as if the WebUI Shell has a problem going more than one directory deep with its $cfg['altname'] option. But maybe I'm way off. I really would like to use the /personal/utorrent/ instead of just /utorrent/ though, so any help is appreciated.

SECOND EDIT: AHA! I got it to work. Like I said above everything works peachy if I use just /utorrent/ for $cfg['altname'], the RewriteRule, and in my webserver's reverse proxy location chunk. So I thought, why can't I just make my own proxy redirect from /personal/utorrent/ to /utorrent/. I did that and it works, all while keeping /personal/utorrent/ in the location bar:

    <Location /utorrent/>
ProxyPass http://utorrent.machine.IP/utorrent/
ProxyPassReverse http://utorrent.machine.IP/utorrent/
</Location>

<Location /personal/utorrent/>
ProxyPass http://www.mydomain.com/utorrent/
ProxyPassReverse http://www.mydomain.com/utorrent/
</Location>

Now the only problem with this is that I can still access the WebUI (Shell) though /utorrent/ too. I was hoping to avoid that, and only have a single entry point (/personal/utorrent). But I guess I can live with this. But if anyone has any ideas on how to force the WebUI Shell to use that 2-level-deep directory redirect, (assuming that IS the problem) I'd be glad to hear it.

THIRD EDIT: I'm an idiot. When I went to change everything to /personal/utorrent/ as per my FIRST EDIT, I forgot to change the paths inside the Location chunk. Changed everything to /personal/utorrent/ INCLUDING that, and it works now, without the need for the second reverse proxy. So basically I voided this whole post. Hopefully my brain-frying toil will help someone else in the future.

To recap, if you want the uTorrent WebUI Multi User Shell (running on a LAN machine) to run through a reverse proxy on your public webserver, thus being masked as http://www.yourdomain.com/whatever/utorrent/ instead of http://www.yourdomain.com/gui/:

- Change the $cfg['altname'] variable in webui_shell.FULL/www/webui_shell/config.php to '/whatever/utorrent/'

- Change '/gui/' in the RewriteRule line in webui_shell.FULL/Apache2/conf/httpd.conf to '/whatever/utorrent/'

- Use the following reverse proxy config in your webserver's httpd.conf (or your httpd-vhosts.conf or whatever):

<Location /whatever/utorrent/>
ProxyPass http://<uT machine IP>:<WebUI Shell Port>/whatever/utorrent/
ProxyPassReverse http://<uT machine IP>:<WebUI Shell Port>/whatever/utorrent/
</Location>

---------------------------------------------------------------------------------------

FOURTH EDIT: Can't make a new post so I have to edit this one.

I made a user account with basically no permissions. I specifically turned off the ability to change file priorities, and it works... when the user right clicks on a file within a torrent and sets the priority nothing happens to the actual torrent, as seen by the physical uT UI. However the user's view is still updated with the change. Looks like a bit of a bug. The user should really have nothing but the standard "disabled" in their right click menu for these files.

Even better, I propose that any function disabled for a user should be completely removed from their context menus, instead of renaming it disabled. Would be much cleaner.

Link to comment
Share on other sites

Heheh, looks like you figured the main problem out so I have nothing further to add.

As to the little bug. I'll have to look into it. The Webui itself (not the shell) works a bit asynchronous (i.e. whatever you do gets immediately updated in the interface without actually confirming the new data unless the change request to the backend returns an error).

But the Webui Shell SHOULD return an error when you try to change properties without permission. In fact within a few seconds that error should show up in red on the left side of the top bar.

As to removing items instead of naming them disabled, that is difficult matter. You have to keep in mind that there are multiple different versions of the webui.zip out there (current, WIP, mini, flash, different colored, etc, etc). For the sake of compatibility the changes I make on-the-fly to webui files have to be kept to a minimum and have to be reasonably dynamic.

Replacing strings in the language files is easy, since it's simple text fields, and nobody will make changes to those in their custom version of the webui.zip and even if they add new strings to the end of the file the Webui Shell can still work with them.

Changing the image containing the icons for example is already a slightly more fallible step.

But changing the CSS (or other) layout files would simply be too error-prone, because this is where people like to change things, so any on-the-fly edits I do base on line numbers or regex searches might not work even after a single edit to such a file. So I'm staying away from those :)

In the end it does say disabled clearly, if users still click and strange things (i.e. it-seems-to-work-but-actually-doesn't desyncs) happen it's their own fault. Remember that the protection actually works, so your µtorrent is safe, it's just their interface that might (although ofc it shouldn't but I will look into that) desync.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...