question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Permission denied in running cli

See original GitHub issue

When i try to run my dumper.py as a periodic task that calls telegram-cli rather than running cli in background manually(test branch is not stable and will crash) , i get open[config_file]: Permission denied error when pytg tries to run cli:

[2016-02-14 19:13:02,692: DEBUG/MainProcess] Task accepted: tasks.run_dumper[fd4bad84-f3d8-4383-b098-3636f62649fe] pid:3788
[2016-02-14 19:13:02,699: INFO/Worker-2] Starting Telegram Executable: "/home/telegramd/tgchannel/tg/bin/telegram-cli -R -W -P 4458 -k /home/telegramd/tgchannel/tg/server.pub --json"
[2016-02-14 19:13:02,703: DEBUG/Worker-2] Parsing raw: Argument help - <command> (needed)
[2016-02-14 19:13:02,704: DEBUG/Worker-2] Sending command > [disable_preview]  help
<
open[config_file]: Permission denied
[2016-02-14 19:13:02,709: INFO/Worker-2] CLI did not responde.
[2016-02-14 19:13:03,710: DEBUG/Worker-2] Parsing raw: Argument help - <command> (needed)
[2016-02-14 19:13:03,711: DEBUG/Worker-2] Sending command > [disable_preview]  help
<
[2016-02-14 19:13:03,711: INFO/Worker-2] CLI did not responde.
[2016-02-14 19:13:04,716: ERROR/MainProcess] Task tasks.run_dumper[fd4bad84-f3d8-4383-b098-3636f62649fe] raised unexpected: AssertionError('CLI Process died.',)
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/site-packages/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/local/lib/python3.4/site-packages/celery/app/trace.py", line 438, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/telegramd/telegram_dumper/tasks.py", line 13, in run_dumper
    main()
  File "/home/telegramd/telegram_dumper/dumper.py", line 170, in main
    pubkey_file="/home/telegramd/tgchannel/tg/server.pub")
  File "/usr/local/lib/python3.4/site-packages/pytg-0.4.5-py3.4.egg/pytg/__init__.py", line 50, in __init__
AssertionError: CLI Process died.

P.S: i’m running pytg as daemon in supervisord.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gictorcommented, Feb 5, 2019

Yes, i’ll do it later. i’m rly busy for a while.

still busy?

0reactions
luckydonaldcommented, Apr 11, 2017

Might be related with #81, too. @vhdmsm, do you still know how you fixed it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Permission denied in Mac Terminal? Try this fix - MacPaw
If you see the error message, it means that Terminal can't complete the command you're trying to run because it is unable to...
Read more >
How to Fix Shell Script Permission Denied Error in Linux
To fix the permission denied error in Linux, one needs to change the file permission of the script. Use the “chmod” (change mode)...
Read more >
Terminal Permission Denied on OS X
Your most likely encounter with a "Permission Denied" error is if you try to install a program or modify a file that's locked...
Read more >
How to Fix Permission Denied in Terminal Mac
This error is an indication that your command is attempting to write to a directory that your user account does not own. Insufficient...
Read more >
How to fix 'permission denied' error in Linux? [Solutions]
This type of error will occur whenever you run a command for which you do not have the execute permission. Similarly, you cannot...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found