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
Crontab permission error when setting up bench with docker on Ubuntu 20.04 #407
Comments
I couldn't reproduce this issue on my machine. ❯ uname -a
Linux revant-laptop 5.10.7-arch1-1 #1 SMP PREEMPT Wed, 13 Jan 2021 12:02:01 +0000 x86_64 GNU/Linux
❯ docker --version
Docker version 20.10.2, build 2291f610ae removed the frappe/bench:latest image to pull the latest and check. Successful Outputfrappe@4d4a73eca44d:/workspace/development$ bench init --skip-redis-config-generation --frappe-branch version-12 frappe-bench
WARN: bench is installed in editable mode!
This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
$ /usr/bin/virtualenv -q env -p python3
Already using interpreter /usr/bin/python3
Getting frappe
$ git clone https://github.com/frappe/frappe.git --branch version-12 --depth 1 --origin upstream
Cloning into 'frappe'...
remote: Enumerating objects: 2649, done.
remote: Counting objects: 100% (2649/2649), done.
remote: Compressing objects: 100% (2471/2471), done.
remote: Total 2649 (delta 354), reused 1037 (delta 128), pack-reused 0
Receiving objects: 100% (2649/2649), 12.44 MiB | 4.09 MiB/s, done.
Resolving deltas: 100% (354/354), done.
Installing frappe
$ frappe-bench/env/bin/pip install -q -U -e frappe-bench/apps/frappe
$ yarn install
yarn install v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > bootstrap@4.3.1" has unmet peer dependency "jquery@1.9.1 - 3".
warning " > bootstrap@4.3.1" has unmet peer dependency "popper.js@^1.14.7".
[4/4] Building fresh packages...
Done in 108.30s.
Updating node packages...
Installing node dependencies for frappe
$ yarn install
yarn install v1.22.10
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.50s.
$ bench build
WARN: bench is installed in editable mode!
This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
yarn run v1.22.10
$ FRAPPE_ENV=production node rollup/build.js
Production mode
✔ Built js/moment-bundle.min.js
✔ Built js/libs.min.js
Building frappe assets...
✔ Built js/checkout.min.js
✔ Built js/dialog.min.js
✔ Built js/modules.min.js
✔ Built js/social.min.js
✔ Built js/web_form.min.js
✔ Built js/chat.js
✔ Built js/list.min.js
✔ Built js/barcode_scanner.min.js
✔ Built frappe/css/email.css
✔ Built js/bootstrap-4-web.min.js
✔ Built js/desk.min.js
✔ Built js/frappe-web.min.js
✔ Built js/frappe-recorder.min.js
✔ Built css/frappe-rtl.css
✔ Built css/printview.css
✔ Built css/form.min.css
✔ Built css/report.min.css
✔ Built css/list.min.css
✔ Built css/module.min.css
✔ Built js/control.min.js
✔ Built css/frappe-chat-web.css
✔ Built css/web_form.css
✔ Built js/form.min.js
✔ Built js/data_import_tools.min.js
✔ Built css/desk.min.css
✔ Built js/report.min.js
✔ Built css/frappe-web-b4.css
✨ Done in 45.784s
Done in 46.67s.
SUCCESS: Bench frappe-bench initialized
frappe@4d4a73eca44d:/workspace/development$ cd frappe-bench/
frappe@4d4a73eca44d:/workspace/development/frappe-bench$ bench set-mariadb-host mariadb
he-host redis-cache:6379
bench set-redis-queue-host redis-queue:6379
bench set-redis-socketio-host redis-socketio:6379WARN: bench is installed in editable mode!
This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
frappe@4d4a73eca44d:/workspace/development/frappe-bench$ bench set-redis-cache-host redis-cache:6379
WARN: bench is installed in editable mode!
This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
frappe@4d4a73eca44d:/workspace/development/frappe-bench$ bench set-redis-queue-host redis-queue:6379
WARN: bench is installed in editable mode!
This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
frappe@4d4a73eca44d:/workspace/development/frappe-bench$ bench set-redis-socketio-host redis-socketio:6379
WARN: bench is installed in editable mode!
This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
frappe@4d4a73eca44d:/workspace/development/frappe-bench$ bench new-site mysite.localhost --no-mariadb-socket
WARN: bench is installed in editable mode!
This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
MySQL root password:
Installing frappe...
Updating DocTypes for frappe : [========================================]
Updating country info : [========================================]
Set Administrator password:
Re-enter Administrator password:
*** Scheduler is disabled ***
frappe@4d4a73eca44d:/workspace/development/frappe-bench$ I was able to start bench and login to |
Try installing the crontab or any other packages as needed. You can even modify permissions of things using
Ideally this should not happen. It is not happening on windows machine with docker desktop as well. |
re open if needed. |
Description of the issue
Following steps described on the development setup guide, leads to error with crontab.
Read crontab frappe: crontabs/frappe/: fopen: Permission denied
Context information (for bug reports)
Operating system: Ubuntu 20.04
Docker version 20.10.2, build 2291f61
bench --version
- 5.2.1Permissions of
crontab
executable for reference:Steps to reproduce the issue
Read crontab frappe: crontabs/frappe/: fopen: Permission denied
Observed result
Following error occurs when setting up bench:
Read crontab frappe: crontabs/frappe/: fopen: Permission denied
Expected result
This error should not occur.
Stacktrace / full error message if available
N/A
The text was updated successfully, but these errors were encountered: