Poetry fails with "permission denied" pip

Hello.

Here's my garuda-inxi output

System:
Kernel: 5.16.9-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.2.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=81f5b3ab-f331-4f94-901e-ff46f362f45c rw rootflags=subvol=@
quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
resume=UUID=139cd65e-f8e5-45e1-a276-00b5e25d6fb3 loglevel=3
Desktop: KDE Plasma 5.24.0 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11
vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Laptop System: Dell product: XPS 13 9360 v: N/A
serial: <superuser required> Chassis: type: 9 serial: <superuser required>
Mobo: Dell model: 02PG84 v: A00 serial: <superuser required> UEFI: Dell
v: 2.7.1 date: 05/21/2018
Battery:
ID-1: BAT0 charge: 33.7 Wh (100.0%) condition: 33.7/60.0 Wh (56.2%)
volts: 8.3 min: 7.6 model: SMP DELL TP1GT61 type: Li-poly serial: <filter>
status: Full
CPU:
Info: model: Intel Core i7-8550U bits: 64 type: MT MCP arch: Coffee Lake
family: 6 model-id: 0x8E (142) stepping: 0xA (10) microcode: 0xEC
Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
L3: 8 MiB desc: 1x8 MiB
Speed (MHz): avg: 787 high: 800 min/max: 400/4000 scaling:
driver: intel_pstate governor: powersave cores: 1: 700 2: 796 3: 800 4: 800
5: 800 6: 800 7: 800 8: 800 bogomips: 31999
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf
mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
IBRS_FW, STIBP: conditional, RSB filling
Type: srbds mitigation: Microcode
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: Intel UHD Graphics 620 vendor: Dell driver: i915 v: kernel
bus-ID: 00:02.0 chip-ID: 8086:5917 class-ID: 0300
Device-2: Microdia Integrated Webcam HD type: USB driver: uvcvideo
bus-ID: 1-5:7 chip-ID: 0c45:670c class-ID: 0e02
Display: x11 server: X.Org 1.21.1.3 compositor: kwin_x11 driver:
loaded: intel unloaded: modesetting alternate: fbdev,vesa display-ID: :0
screens: 1
Screen-1: 0 s-res: 4480x1080 s-dpi: 96 s-size: 1184x285mm (46.6x11.2")
s-diag: 1218mm (47.9")
Monitor-1: DP1-1 res: 2560x1080 hz: 60 dpi: 97
size: 670x280mm (26.4x11.0") diag: 726mm (28.6")
Monitor-2: DP1-2 res: 1920x1080 hz: 60 dpi: 84
size: 580x240mm (22.8x9.4") diag: 628mm (24.7")
OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2)
v: 4.6 Mesa 21.3.6 direct render: Yes
Audio:
Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell
driver: snd_hda_intel v: kernel alternate: snd_soc_skl bus-ID: 00:1f.3
chip-ID: 8086:9d71 class-ID: 0403
Sound Server-1: ALSA v: k5.16.9-zen1-1-zen running: yes
Sound Server-2: PulseAudio v: 15.0 running: no
Sound Server-3: PipeWire v: 0.3.45 running: yes
Network:
Device-1: Intel Wi-Fi 6 AX210/AX211/AX411 160MHz driver: iwlwifi v: kernel
bus-ID: 3a:00.0 chip-ID: 8086:2725 class-ID: 0280
IF: wlp58s0 state: up mac: <filter>
Device-2: ASIX AX88179 Gigabit Ethernet type: USB driver: ax88179_178a
bus-ID: 4-1.4.2:4 chip-ID: 0b95:1790 class-ID: ff00 serial: <filter>
IF: enp57s0u1u4u2 state: up speed: 1000 Mbps duplex: full mac: <filter>
IF-ID-1: anbox0 state: down mac: <filter>
Bluetooth:
Device-1: Intel AX210 Bluetooth type: USB driver: btusb v: 0.8
bus-ID: 1-3:3 chip-ID: 8087:0032 class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
Local Storage: total: 1.82 TiB used: 35.86 GiB (1.9%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
model: SSD 970 EVO Plus 2TB size: 1.82 TiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: 2B2QEXM7 temp: 34.9 C scheme: GPT
Partition:
ID-1: / raw-size: 200 GiB size: 200 GiB (100.00%) used: 29.63 GiB (14.8%)
fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2 maj-min: 259:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 576 KiB (0.2%) fs: vfat block-size: 512 B dev: /dev/nvme0n1p1
maj-min: 259:1
ID-3: /home raw-size: 200 GiB size: 200 GiB (100.00%)
used: 29.63 GiB (14.8%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2
maj-min: 259:2
ID-4: /var/log raw-size: 200 GiB size: 200 GiB (100.00%)
used: 29.63 GiB (14.8%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2
maj-min: 259:2
ID-5: /var/tmp raw-size: 200 GiB size: 200 GiB (100.00%)
used: 29.63 GiB (14.8%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2
maj-min: 259:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: partition size: 16.89 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
ID-2: swap-2 type: zram size: 15.35 GiB used: 0 KiB (0.0%) priority: 100
dev: /dev/zram0
Sensors:
System Temperatures: cpu: 43.0 C pch: 40.5 C mobo: 31.0 C sodimm: SODIMM C
Fan Speeds (RPM): cpu: 0
Info:
Processes: 357 Uptime: 48m wakeups: 2 Memory: 15.35 GiB
used: 5.65 GiB (36.8%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 11.2.0 clang: 13.0.1 Packages: pacman: 1476 lib: 352 Shell: fish
v: 3.3.1 default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.12
Garuda (2.5.4-2):
System install date:     2022-02-06
Last full system update: 2022-02-15
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       Probably (Run as root to verify)
Snapshots:               Snapper
Failed units:            systemd-networkd-wait-online.service

Problem I'm having is that I'm on a new installation of Garuda, first time user - have been on a vanilla Arch for the past 10 years.
I am using this machine as a dev box.

  • I've installed poetry package (python-poetry) and pyenv;
  • I installed python 3.8.12
  • made python 3.8 "local" (pyenv local 3.8.12, poetry env use 3.8.12)
  • have created a new virtual env (python3.8 -m venv .venv)
  • once I run "poetry install", it crashes with a "Permission Denied".

Full error is below:

Installing dependencies from lock file

Package operations: 92 installs, 0 updates, 0 removals

• Installing pycparser (2.21): Failed

PermissionError

[Errno 13] Permission denied: '.venv/bin/pip'

at /usr/lib/python3.8/subprocess.py:1704 in _execute_child
1700│                     else:
1701│                         err_filename = orig_executable
1702│                     if errno_num != 0:
1703│                         err_msg = os.strerror(errno_num)
→ 1704│                     raise child_exception_type(errno_num, err_msg, err_filename)
1705│                 raise child_exception_type(err_msg)
1706│
1707│
1708│         def _handle_exitstatus(self, sts, _WIFSIGNALED=os.WIFSIGNALED,

I've racked my brains for the past 2 days, and I cannot understand why that is; file permissions are definitely correct.
Anybody having issues with python-poetry, or can advise how to fix it?

Did you search in web before open this topic?

and
:slight_smile:

1 Like

Hello,

yes, I did search the web before opening this topic.
The issue is not with pycparser, the issue is with poetry on Garuda Linux.

If I install the packages manually, it works, and the it will bail out on the next package, and so on.
Workplace is heavily reliant on poetry, hence I cannot just fallback on pip (not that I wouldn't want to).

I'm seeking for some clarification, and to understand if I need to blast my OS again, and look for another distro.

Thank you

Upon closer inspection, something is fishy.
I'm not sure what is happening, permissions wise, but the following may provide more context as to where the issue may lie:

fish: The file “.venv/bin/pip” is not executable by this user

However, if I run the following, it works fine:

[🔍] × .venv/bin/python
Python 3.8.12 (default, Jan  2 2022, 22:34:48)
[GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

Why would the permissions be different for the active user, for files that have been created by the active user??

λ ls -lah  .venv/bin/p*
Permissions Size User Date Modified Name
.rwxr-xr-x   282 755  15 Feb 11:02   .venv/bin/pip
.rwxr-xr-x   282 755  15 Feb 11:02   .venv/bin/pip3
.rwxr-xr-x   282 755  15 Feb 11:02   .venv/bin/pip3.8
lrwxrwxrwx     9 755  15 Feb 10:01   .venv/bin/python -> python3.8
lrwxrwxrwx     9 755  15 Feb 10:01   .venv/bin/python3 -> python3.8
lrwxrwxrwx    18 755  15 Feb 10:01   .venv/bin/python3.8 -> /usr/bin/python3.8

Thanks for feedback!

I will close this.

After some digging, I remembered that Arch Linux on its own is setting up the mount points with the user flag.
In this particular instance, custom mount points were created with the users flag at the end, which by default sets it to noexec.

Thanks for feedback and time.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.