Page MenuHomeSoftware Heritage
Paste P1270

"http call as user nobody" says no
ActivePublic

Authored by ardumont on Jan 31 2022, 11:40 AM.
root@pergamon:~# sudo -u nobody /bin/bash
nobody@pergamon:/root$ chronic /usr/local/bin/weekly-planning-bot
+ DEST=ardumont@softwareheritage.org
+ AUTHOR=swh-team@inria.fr
+ TEMPLATE_ID=6YKT5osoST-amJQ0MusH2Q
+ URL=https://hedgedoc.softwareheritage.org
++ date +%G-W%V
+ DATE=2022-W05
++ http -pb https://hedgedoc.softwareheritage.org/6YKT5osoST-amJQ0MusH2Q/download
Traceback (most recent call last):
File "/usr/bin/http", line 11, in <module>
load_entry_point('httpie==0.9.8', 'console_scripts', 'http')()
File "/usr/lib/python3/dist-packages/httpie/__main__.py", line 11, in main
sys.exit(main())
File "/usr/lib/python3/dist-packages/httpie/core.py", line 193, in main
if env.config.default_options:
File "/usr/lib/python3/dist-packages/httpie/context.py", line 82, in config
self._config.save()
File "/usr/lib/python3/dist-packages/httpie/config.py", line 68, in save
with open(self.path, 'w') as f:
File "/usr/lib/python3/dist-packages/httpie/config.py", line 34, in path
os.makedirs(os.path.dirname(path), mode=0o700)
File "/usr/lib/python3.7/os.py", line 211, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/usr/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/nonexistent'
+ TEMPLATE=
nobody@pergamon:/root$ which http
/usr/bin/http
nobody@pergamon:/root$ http
Traceback (most recent call last):
File "/usr/bin/http", line 11, in <module>
load_entry_point('httpie==0.9.8', 'console_scripts', 'http')()
File "/usr/lib/python3/dist-packages/httpie/__main__.py", line 11, in main sys.exit(main())
File "/usr/lib/python3/dist-packages/httpie/core.py", line 193, in main
if env.config.default_options:
File "/usr/lib/python3/dist-packages/httpie/context.py", line 82, in config
self._config.save()
File "/usr/lib/python3/dist-packages/httpie/config.py", line 68, in save
with open(self.path, 'w') as f:
File "/usr/lib/python3/dist-packages/httpie/config.py", line 34, in path
os.makedirs(os.path.dirname(path), mode=0o700)
File "/usr/lib/python3.7/os.py", line 211, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/usr/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/nonexistent'
nobody@pergamon:/root$ cd /tmp
nobody@pergamon:/tmp$ chronic /usr/local/bin/weekly-planning-bot
+ DEST=ardumont@softwareheritage.org
+ AUTHOR=swh-team@inria.fr
+ TEMPLATE_ID=6YKT5osoST-amJQ0MusH2Q
+ URL=https://hedgedoc.softwareheritage.org
++ date +%G-W%V
+ DATE=2022-W05
++ http -pb https://hedgedoc.softwareheritage.org/6YKT5osoST-amJQ0MusH2Q/download
Traceback (most recent call last):
File "/usr/bin/http", line 11, in <module>
load_entry_point('httpie==0.9.8', 'console_scripts', 'http')()
File "/usr/lib/python3/dist-packages/httpie/__main__.py", line 11, in main
sys.exit(main())
File "/usr/lib/python3/dist-packages/httpie/core.py", line 193, in main
if env.config.default_options:
File "/usr/lib/python3/dist-packages/httpie/context.py", line 82, in config
self._config.save()
File "/usr/lib/python3/dist-packages/httpie/config.py", line 68, in save
with open(self.path, 'w') as f:
File "/usr/lib/python3/dist-packages/httpie/config.py", line 34, in path
os.makedirs(os.path.dirname(path), mode=0o700)
File "/usr/lib/python3.7/os.py", line 211, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/usr/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/nonexistent'
+ TEMPLATE=
nobody@pergamon:/tmp$ /usr/local/bin/weekly-planning-bot
+ DEST=ardumont@softwareheritage.org
+ AUTHOR=swh-team@inria.fr
+ TEMPLATE_ID=6YKT5osoST-amJQ0MusH2Q
+ URL=https://hedgedoc.softwareheritage.org
++ date +%G-W%V
+ DATE=2022-W05
++ http -pb https://hedgedoc.softwareheritage.org/6YKT5osoST-amJQ0MusH2Q/download
Traceback (most recent call last):
File "/usr/bin/http", line 11, in <module>
load_entry_point('httpie==0.9.8', 'console_scripts', 'http')()
File "/usr/lib/python3/dist-packages/httpie/__main__.py", line 11, in main
sys.exit(main())
File "/usr/lib/python3/dist-packages/httpie/core.py", line 193, in main
if env.config.default_options:
File "/usr/lib/python3/dist-packages/httpie/context.py", line 82, in config
self._config.save()
File "/usr/lib/python3/dist-packages/httpie/config.py", line 68, in save
with open(self.path, 'w') as f:
File "/usr/lib/python3/dist-packages/httpie/config.py", line 34, in path
os.makedirs(os.path.dirname(path), mode=0o700)
File "/usr/lib/python3.7/os.py", line 211, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/usr/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/nonexistent'
+ TEMPLATE=

Event Timeline

ardumont changed the title of this paste from "chronic call as user nobody" says no to "http call as user nobody" says no.

Calling http (from httpie package) is the issue.
That cli tries to write something when calling it.