¿Por qué sudo apt install /path/*.deb produce permiso denegado mientras que sudo dpkg -i /path/*.deb funciona bien?

¿Por qué sudo apt install /path/*.deb produce permiso denegado mientras que sudo dpkg -i /path/*.deb funciona bien?

Durante mucho tiempo me pregunté por qué sudo aptno se puede instalar localmente debdesde algunas carpetas con error:

Failed to fetch a file... Permission denied 

Recientemente probé sudo dpkg -iel mismo camino y funcionó. La ruta está en el USB montado con udisks, por lo que está dentro de una /media/usercarpeta y, a partir de ahora, supongo que se debe a ACLesa carpeta ( drwxr-x---+). Pero, ¿por qué a un comando sudose le deniega el permiso? ¿Por qué entonces otro comando en los mismos archivos funciona bien?

Lo usaría dpkg, pero no procesa las dependencias previas en el orden adecuado, a diferencia de apt.

¿Hay alguna forma de omitir la búsqueda de parte apt? Antes de buscar, cerca del inicio de la salida aptse obtiene Note selecting abc instead of abc.20-2-a.deb. ¿Hay alguna manera de procesar archivos aptparticulares deb, sin intentar localizar otros?

PD: Conozco otras formas de instalar debs locales, por ejemplo, agregando un repositorio local o usando archivos no preinstalados apt-offlinedesdeCómo instalar paquetes sin internet, pero me gustaría mantener las cosas simples (además, sospecho que la forma del repositorio local podría enfrentar el mismo problema de permiso denegado).

Añadido 2:

sudo mount rd -t tmpfs /media/mint/rd -o x-mount.mkdir
sudo mount ram -t tmpfs /media/ram -o x-mount.mkdir

apt from rdfalla, apt from ramfunciona bien, así que supongo que el problema está en mintACL, intenté mostrarlo a continuación, no entiendo mucho ACL en Linux. Las unidades USB insertadas están montadas debajo del usuario mint(usuario de liveUSB), así que quiero abordarlo. Cuando obtengo el símbolo del sistema raíz , sudo -ipuedo crear manualmente mkdirun archivo, mventonces , ¿por qué falla?rdsudo touch /media/mint/rd/mpv/1sudo apt

Agregado:

permisos inc. LCA:

mint@mint:~$ ls -la /media/mint/rd
total 0
drwxrwxrwt  4 root root 80 Oct 24 03:23 .
drwxr-xrw-+ 4 root root 80 Oct 24 03:22 ..
drwxrwxrwx  2 mint mint 80 Oct 12 23:01 ffmpeg
drwxrwxrwx  2 mint mint 60 Oct 11 17:53 mpv

ACL:
mint@mint:~$ getfacl /media/mint/
getfacl: Removing leading '/' from absolute path names
# file: media/mint/
# owner: root
# group: root
user::rwx
user:mint:r-x
group::---
mask::r-x
other::rw-

apto/apt-obtener salida:

mint@mint:~$ sudo apt install -d /media/mint/rd/ffmpeg/*.deb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'ffmpeg' instead of '/media/mint/rd/ffmpeg/ffmpeg_7%3a4.2.4-1ubuntu0.1_amd64.deb'
Note, selecting 'libavresample4' instead of '/media/mint/rd/ffmpeg/libavresample4_7%3a4.2.4-1ubuntu0.1_amd64.deb'
Suggested packages:
  ffmpeg-doc
The following NEW packages will be installed:
  ffmpeg libavresample4
0 upgraded, 2 newly installed, 0 to remove and 71 not upgraded.
Need to get 1507 kB of archives.
After this operation, 2275 kB of additional disk space will be used.
Ign:1 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 libavresample4 amd64 7:4.2.4-1ubuntu0.1
Ign:2 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 ffmpeg amd64 7:4.2.4-1ubuntu0.1
Ign:1 http://security.ubuntu.com/ubuntu focal-updates/universe amd64 libavresample4 amd64 7:4.2.4-1ubuntu0.1
Ign:2 http://security.ubuntu.com/ubuntu focal-updates/universe amd64 ffmpeg amd64 7:4.2.4-1ubuntu0.1
Get:1 http://security.ubuntu.com/ubuntu focal-updates/universe amd64 libavresample4 amd64 7:4.2.4-1ubuntu0.1 [54.2 kB]
Err:1 http://security.ubuntu.com/ubuntu focal-updates/universe amd64 libavresample4 amd64 7:4.2.4-1ubuntu0.1
  File not found - /media/mint/rd/ffmpeg/libavresample4_70x0.07ffe00000006p-10224.2.4-1ubuntu0.1_amd64.deb (13: Permission denied)
Get:2 http://security.ubuntu.com/ubuntu focal-updates/universe amd64 ffmpeg amd64 7:4.2.4-1ubuntu0.1 [1453 kB]
Err:2 http://security.ubuntu.com/ubuntu focal-updates/universe amd64 ffmpeg amd64 7:4.2.4-1ubuntu0.1
  File not found - /media/mint/rd/ffmpeg/ffmpeg_70x0.07ffe00000002p-10224.2.4-1ubuntu0.1_amd64.deb (13: Permission denied)
E: Failed to fetch file:/media/mint/rd/ffmpeg/libavresample4_7%3a4.2.4-1ubuntu0.1_amd64.deb  File not found - /media/mint/rd/ffmpeg/libavresample4_70x0.07ffe00000006p-10224.2.4-1ubuntu0.1_amd64.deb (13: Permission denied)
E: Failed to fetch file:/media/mint/rd/ffmpeg/ffmpeg_7%3a4.2.4-1ubuntu0.1_amd64.deb  File not found - /media/mint/rd/ffmpeg/ffmpeg_70x0.07ffe00000002p-10224.2.4-1ubuntu0.1_amd64.deb (13: Permission denied)
E: Some files failed to download
mint@mint:~$ sudo apt-get install -d /media/mint/rd/ffmpeg/*.deb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'ffmpeg' instead of '/media/mint/rd/ffmpeg/ffmpeg_7%3a4.2.4-1ubuntu0.1_amd64.deb'
Note, selecting 'libavresample4' instead of '/media/mint/rd/ffmpeg/libavresample4_7%3a4.2.4-1ubuntu0.1_amd64.deb'
Suggested packages:
  ffmpeg-doc
The following NEW packages will be installed:
  ffmpeg libavresample4
0 upgraded, 2 newly installed, 0 to remove and 71 not upgraded.
Need to get 1507 kB of archives.
After this operation, 2275 kB of additional disk space will be used.
Ign:1 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 libavresample4 amd64 7:4.2.4-1ubuntu0.1
Ign:2 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 ffmpeg amd64 7:4.2.4-1ubuntu0.1
Ign:1 http://security.ubuntu.com/ubuntu focal-updates/universe amd64 libavresample4 amd64 7:4.2.4-1ubuntu0.1
Ign:2 http://security.ubuntu.com/ubuntu focal-updates/universe amd64 ffmpeg amd64 7:4.2.4-1ubuntu0.1
Get:1 http://security.ubuntu.com/ubuntu focal-updates/universe amd64 libavresample4 amd64 7:4.2.4-1ubuntu0.1 [54.2 kB]
Err:1 http://security.ubuntu.com/ubuntu focal-updates/universe amd64 libavresample4 amd64 7:4.2.4-1ubuntu0.1
  File not found - /media/mint/rd/ffmpeg/libavresample4_70x0.07fff00000006p-10224.2.4-1ubuntu0.1_amd64.deb (13: Permission denied)
Get:2 http://security.ubuntu.com/ubuntu focal-updates/universe amd64 ffmpeg amd64 7:4.2.4-1ubuntu0.1 [1453 kB]
Err:2 http://security.ubuntu.com/ubuntu focal-updates/universe amd64 ffmpeg amd64 7:4.2.4-1ubuntu0.1
  File not found - /media/mint/rd/ffmpeg/ffmpeg_70x0.07fff00000002p-10224.2.4-1ubuntu0.1_amd64.deb (13: Permission denied)
E: Failed to fetch file:/media/mint/rd/ffmpeg/libavresample4_7%3a4.2.4-1ubuntu0.1_amd64.deb  File not found - /media/mint/rd/ffmpeg/libavresample4_70x0.07fff00000006p-10224.2.4-1ubuntu0.1_amd64.deb (13: Permission denied)
E: Failed to fetch file:/media/mint/rd/ffmpeg/ffmpeg_7%3a4.2.4-1ubuntu0.1_amd64.deb  File not found - /media/mint/rd/ffmpeg/ffmpeg_70x0.07fff00000002p-10224.2.4-1ubuntu0.1_amd64.deb (13: Permission denied)
E: Some files failed to download

Respuesta1

Según tengo entendido ahora (gracias a los comentarios) sudo aptusa _aptusuario. Y la ausencia de permiso de ejecución para la carpeta principal /media/mintle impidió acceder a los archivos. La solución es agregar permiso ejecutivo, por ejemplo

setfacl -m u:_apt:x /media/mint

información relacionada