Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web2py installation requires deposit and logs directories in root folder #833

Open
hyanwong opened this issue Apr 24, 2024 · 3 comments
Open

Comments

@hyanwong
Copy link
Member

It seems like web2py tries to make a deposit folder in the root dir. The docs say:

The first time you start web2py, two new folders are created: deposit and applications. The deposit folder is used as temporary storage for installing and uninstalling applications.

When installing from scratch, the web process may not have write access, so we should create this folder with group write permissions e.g. in

for APP_PATH in "${PROJECT_PATH}" "${ADMIN_PATH}"; do
if it doesn't exist.

The same seems to go for logs, which also seems to be required at the top level.

@lentinj
Copy link
Collaborator

lentinj commented Apr 25, 2024

It'd be nicer to knobble the need for deposit if we can. It's not immediately obvious why this would have been triggered, I'm guessing it's trying to install welcome.w2p or summat.

If you still have a stack trace for the original error, it'd be worth pasting in here.

@hyanwong
Copy link
Member Author

This is what I saved. It might not be enough:

unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. GAME OVER ***
    create_missing_folders()
  File "/usr/home/web2py/www.onezoom.org/gluon/fileutils.py", line 506, in create_missing_folders
    try_mkdir(abspath(path, gluon=True))
  File "/usr/home/web2py/www.onezoom.org/gluon/fileutils.py", line 495, in try_mkdir
    os.mkdir(path)
PermissionError: [Errno 13] Permission denied: '/usr/home/web2py/www.onezoom.org/deposit'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. GAME OVER ***

@lentinj
Copy link
Collaborator

lentinj commented Apr 25, 2024

Looks like it's gated behind a setting:

https://github.com/web2py/web2py/blob/69f34e290364a36a1185f49c029a62b45b63f9c2/gluon/fileutils.py#L503-L506

Dunno if that setting could be twiddled though (or what runtime_gae is).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants