But the web2py app have to be modified via admin therefore I do not
think we can avoid putting them in var.

On Mar 22, 11:49 am, Dima Barsky <d...@debian.org> wrote:
> Hi Massimo,
>
> That sounds like a plan to me. There is only one problem left: I don't
> think that putting application code under /var is a good idea. I'll
> have to check the packaging manual, but my gut feeling is that all
> python code must go under /usr. The same logic applies as before - /
> usr might be shared across several machines, /var is not shared.
>
> How difficult would it be to allow each application to have a config
> file which specifies where the runtime files should be stored? That
> would be so much cleaner..
>
> Regards,
> Dima.
>
> On Mar 22, 3:17 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > You can do this.
> > 1) move web2py/*.py and  web2py/gluon somewhere in PYTHONPATH (/
> > somewhere)
> > 3) create a /var/web2py/
> > 4) create a /etc/web2py/
> > move applications and deposit under /var/web2py
> > move options_std.py under  /etc/web2py  and EDIT as follow:
> > """
> > import socket
> > import os
> > ip = '127.0.0.1'
> > port = 8000
> > password = '<recycle>'  # ## <recycle> means use the previous
> > password
> > pid_filename = '/var/web2py/httpserver.pid'
> > log_filename = '/var/web2py/httpserver.log'
> > profiler_filename = None
> > ssl_certificate = ''  # ## path to certificate
> > file
> > ssl_private_key = ''  # ## path to private key
> > file
> > numthreads = 10
> > server_name = socket.gethostname()
> > request_queue_size = 5
> > timeout = 10
> > shutdown_timeout = 5
> > folder = os.getcwd()
> > extcron = None
> > nocron = None
> > """
>
> > create a startup script somewhere that does:
> > """
> > import os
> > import sys
> > ### add gluon to sys.path and ...
> > os.chdir('/var/web2py')
>
> > import gluon.import_all
> > import gluon.widget
> > # Start Web2py and Web2py cron
> > service!
> > gluon.widget.start(cron=True)
> > """
>
> > This should be all it needs.
>
> > On Mar 22, 9:58 am, "Mark Breedveld" <m.breedv...@solcon.nl> wrote:
>
> > > Hi Dima,
>
> > > I agree on the fact that it is not an elegant solution.
> > > But till now we have we have two possible solutions.
>
> > > The First one is to create a user web2py and make it a member of www-data.
> > > And put the application in the home folder which will work.
> > > - No diskprotected multi-user system (or it has be programmed into web2py)
> > > + easy done with no modification to web2py
>
> > > The second solution
> > > With symlinks (see mail history)
> > > + multi-user and protected by file system
> > > - possible securite leaks through web2py application data (Massimo?)
> > > + easy to update through apt
>
> > > The read only problem could be fixed with the Group rights.
> > > We could grant the www-data only write rights,
> > > And the web2py user only read rights and member of www-data group.
> > > This will make sure that users can't read each other files,
> > > but still can write in the app dictory by its Group rights.
>
> > > I hope to starting testing a few of those things on short notice.
> > > But i'm quite busy at the moment, so it might take a few days.
>
> > > And there are a few things more to discuss.
> > > Coming in my following mail later this day.
>
> > > Regards Mark Breedveld,
>
> > > Ps. Massimo could you make a seperation between app and user data?
>
> > > -----Oorspronkelijk bericht-----
> > > Van: web2py@googlegroups.com [mailto:web...@googlegroups.com] Namens Dima
> > > Barsky
> > > Verzonden: zondag 21 maart 2010 17:32
> > > Aan: web2py-users
> > > Onderwerp: [web2py] Re: Debian / Ubuntu packager needed!
>
> > > Hi Mark,
>
> > > The idea with symlinks might work, although it's not very elegant.
>
> > > Packaging individual applications is not easy either, there is another
> > > problem I forgot to mention. Currently web2py assumes that it has
> > > write permissions for the whole web2py directories (including
> > > subdirectories).  It creates various files inside the application's
> > > directory - databases, error tickets, session-related files, and so
> > > on.  That would never work with a debian package, all runtime files
> > > should be created under /var/run.  In short, the web2py code should be
> > > able to run from a read-only directory structure.  I guess it'll take
> > > a fair amount of work to achieve this, I don't feel confident enough
> > > to do this on my own. Any volunteers?
>
> > > Regards,
> > > Dima.
>
> > > On Mar 21, 3:08 pm, Mark Breedveld <m.breedv...@solcon.nl> wrote:
>
> > > > Thank you for your reply.
>
> > > > Aldo my first reply suggested that I wanted to seperate the admin app.
> > > > This not my intention.
> > > > With web2py-<appname>.deb was for verified user apps from web2py.com.
>
> > > > But still your interpretation of it ain't an wrong idee.
> > > > For securite and vps reasons/situations it's required to run in there
> > > > own directory.
>
> > > > So if possible, we could link the application to user directory
> > > > which means that every user that is running web2py will get a web2py
> > > > directory.
> > > > somethink like.
> > > > /home/<user>/web2py/
> > > > which contains a symlink to following directories
> > > > /usr/local/bin/web2py/gluon/
> > > > /usr/local/bin/web2py/scripts/
> > > > and the following files
> > > > /usr/local/bin/web2py/web2py.py
> > > > and all other user independent files /*massimo knows which files that
> > > > would be
> > > > create directory
> > > > /home/<user>/web2py/application
> > > > put a symlink to
> > > > /usr/local/bin/web2py/application/admin/
> > > > then put under
> > > > /home/<user>/web2py/
> > > > parameters_8000.py
>
> > > > Then create a start up entry for that user.
>
> > > > There are a few problems with this plan.
> > > > Does every user has his own web2py?
> > > > Has web2py problems with symlinks?
> > > > Is the symlink a real bottleneck for web2py and should there be a
> > > > hardlink?
> > > > Are the directories accoording the ubuntu guidlines?
>
> > > > I fairly interested in your opinion.
>
> > > > regards Mark Breedveld,
>
> > > > On Mar 21, 1:15 pm, Dima Barsky <d...@debian.org> wrote:
>
> > > > > On Mar 20, 5:01 pm, Mark Breedveld <m.breedv...@solcon.nl> wrote:
>
> > > > > > The web2py community is searching help ondebian/ ubuntu packaging.
> > > > > > The are concrete plans to deploy web2py as Turnkey Appliance.
>
> > > > > Mark,
>
> > > > > I'll see what I can do, although it might be not straightforward.
> > > > > There is no clear separation in web2py between the library code and
> > > > > the user code.  Take, for example, the admin application: it is
> > > > > located under the applications directory nearby the user code, but
> > > > > it's really part of the core, as web2py refuses to start without it.
>
> > > > > I would say the first step should be to patch web2py to allow the user
> > > > > code to be located somewhere else, not in the web2py directory, which
> > > > > is currently not possible. I'll give it a go, but I'm not very
> > > > > familiar with web2py internals, so I would appreciate a bit of help
> > > > > from somebody more experienced. Once this is done, the actual
> > > > > packaging will be quite simple.
>
> > > > > Regards,
> > > > > Dima.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "web2py-users" group.
> > > To post to this group, send email to web...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > web2py+unsubscr...@googlegroups.com.
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/web2py?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to