AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / user-791351

killer_rabbit's questions

Martin Hope
killer_rabbit
Asked: 2025-04-10 15:06:49 +0800 CST

Como reparar diretórios snap bagunçados?

  • 7

Estou executando o Ubuntu 24.04.2 LTS.

Como meu sistema de arquivos raiz estava gravemente congestionado, eu estava procurando uma maneira de mover meus snaps para outro sistema de arquivos, na minha pasta pessoal. Encontrei este tópico e decidi seguir as indicações nele contidas (eu sei, eu deveria ter pesquisado mais...), da melhor maneira possível. Infelizmente, parece que este tópico não continha uma resposta adequada – e, além disso, cometi alguns erros ao segui-lo – incluindo:

  • movendo a pasta de snap errada;
  • criando o link simbólico errado; e
  • tentando reverter o processo depois,

...o que me levou a encher ainda mais meu sistema de arquivos. Agora, nenhum dos meus snaps funciona mais. Estou procurando ajuda para consertar essa bagunça, por favor.

Este é o log do que eu fiz:

d@boom:~$ sudo mv /var/snap ~/snap
[sudo] password for d: 
d@boom:~$ cd /var
d@boom:/var$ ls
backups  cache  crash  lib  local  lock  log  mail  metrics  opt  run  spool  tmp
d@boom:/var$ sudo ln -s ~/snap /snap
d@boom:/var$ ls -la
total 56
drwxr-xr-x 13 root root     4096  4月  7 19:52 .
drwxr-xr-x 23 root root     4096  4月  7 19:19 ..
drwxr-xr-x  2 root root     4096  4月  7 08:04 backups
drwxr-xr-x 23 root root     4096  2月 17 17:41 cache
drwxrwsrwt  2 root whoopsie 4096  4月  6 14:49 crash
drwxr-xr-x 77 root root     4096  3月  6 18:29 lib
drwxrwsr-x  2 root staff    4096  4月 22  2024 local
lrwxrwxrwx  1 root root        9  8月 27  2024 lock -> /run/lock
drwxrwxr-x 17 root syslog   4096  4月  7 08:22 log
drwxrwsr-x  2 root mail     4096  8月 27  2024 mail
drwxrwsrwt  2 root whoopsie 4096  8月 27  2024 metrics
drwxr-xr-x  2 root root     4096  8月 27  2024 opt
lrwxrwxrwx  1 root root        4  8月 27  2024 run -> /run
drwxr-xr-x  8 root root     4096  7月 18  2017 spool
drwxrwxrwt 16 root root     4096  4月  7 19:38 tmp
-rw-r--r--  1 root root      208  8月 27  2024 .updated
d@boom:/var$ sudo ls -la
total 56
drwxr-xr-x 13 root root     4096  4月  7 19:52 .
drwxr-xr-x 23 root root     4096  4月  7 19:19 ..
drwxr-xr-x  2 root root     4096  4月  7 08:04 backups
drwxr-xr-x 23 root root     4096  2月 17 17:41 cache
drwxrwsrwt  2 root whoopsie 4096  4月  6 14:49 crash
drwxr-xr-x 77 root root     4096  3月  6 18:29 lib
drwxrwsr-x  2 root staff    4096  4月 22  2024 local
lrwxrwxrwx  1 root root        9  8月 27  2024 lock -> /run/lock
drwxrwxr-x 17 root syslog   4096  4月  7 08:22 log
drwxrwsr-x  2 root mail     4096  8月 27  2024 mail
drwxrwsrwt  2 root whoopsie 4096  8月 27  2024 metrics
drwxr-xr-x  2 root root     4096  8月 27  2024 opt
lrwxrwxrwx  1 root root        4  8月 27  2024 run -> /run
drwxr-xr-x  8 root root     4096  7月 18  2017 spool
drwxrwxrwt 16 root root     4096  4月  7 19:38 tmp
-rw-r--r--  1 root root      208  8月 27  2024 .updated
d@boom:/var$ ls
backups  cache  crash  lib  local  lock  log  mail  metrics  opt  run  spool  tmp
d@boom:/var$ ls -ln
total 44
drwxr-xr-x  2 0   0 4096  4月  7 08:04 backups
drwxr-xr-x 23 0   0 4096  2月 17 17:41 cache
drwxrwsrwt  2 0 109 4096  4月  6 14:49 crash
drwxr-xr-x 77 0   0 4096  3月  6 18:29 lib
drwxrwsr-x  2 0  50 4096  4月 22  2024 local
lrwxrwxrwx  1 0   0    9  8月 27  2024 lock -> /run/lock
drwxrwxr-x 17 0 102 4096  4月  7 08:22 log
drwxrwsr-x  2 0   8 4096  8月 27  2024 mail
drwxrwsrwt  2 0 109 4096  8月 27  2024 metrics
drwxr-xr-x  2 0   0 4096  8月 27  2024 opt
lrwxrwxrwx  1 0   0    4  8月 27  2024 run -> /run
drwxr-xr-x  8 0   0 4096  7月 18  2017 spool
drwxrwxrwt 16 0   0 4096  4月  7 19:38 tmp
d@boom:/var$ sudo mv ~/snap /var/snap
mv: error writing '/var/snap/thunderbird/common/.thunderbird/3ie11tn2.default/ImapMail/mail.da.info/INBOX.sbd/Drafts': No space left on device
mv: cannot create directory '/var/snap/thunderbird/684': No space left on device
mv: cannot create directory '/var/snap/mattermost-desktop': No space left on device
mv: cannot create directory '/var/snap/chromium': No space left on device
mv: cannot create directory '/var/snap/snap': No space left on device
mv: cannot create directory '/var/snap/metadata-cleaner': No space left on device

Mais tarde, para liberar espaço, reiniciei e fiz

sudo rm -r /var/snap

Caso seja útil, aqui está o que eu ganho em troca de snap list:

Name                       Version                     Rev    Tracking         Publisher      Notes
bare                       1.0                         5      latest/stable    canonical✓     base
chromium                   -                           3084   latest/stable    canonical✓     broken
core                       16-2.61.4-20240607          17200  latest/stable    canonical✓     core
core20                     20241206                    2496   latest/stable    canonical✓     base
core22                     20250210                    1802   latest/stable    canonical✓     base
core24                     20241217                    739    latest/stable    canonical✓     base
cups                       2.4.11-3                    1079   latest/stable    openprinting✓  -
ffmpeg-2204                7.0                         126    latest/stable    snapcrafters✪  -
ffmpeg-2404                7.1.1                       59     latest/stable    snapcrafters✪  -
firefox                    136.0.3-1                   5947   latest/stable    mozilla✓       -
firmware-updater           0+git.22198be               167    1/stable/…       canonical✓     -
gnome-42-2204              0+git.38ea591               202    latest/stable/…  canonical✓     -
gnome-46-2404              0+git.7d0cf36               77     latest/stable    canonical✓     -
gtk-common-themes          0.1-81-g442e511             1535   latest/stable/…  canonical✓     -
gtk2-common-themes         0.1                         13     latest/stable    canonical✓     -
hunspell-dictionaries      u16.04-20180902+pkg-8e08    21     latest/stable    brlin          -
kf6-core24                 6.8.2-6.11.0-6.2.5-24.12.3  22     latest/stable    kde✓           -
mattermost-desktop         5.11.2                      778    latest/stable    snapcrafters✪  -
mesa-2404                  24.2.8                      495    latest/stable    canonical✓     -
metadata-cleaner           2.5.4                       58     latest/stable    soumyadghosh✪  -
snap-store                 0+git.90575829              1270   2/stable/…       canonical✓     -
snapd                      2.67.1                      23771  latest/stable    canonical✓     snapd
snapd-desktop-integration  0.9                         253    latest/stable    canonical✓     -
thunderbird                128.8.1esr-1                684    latest/stable    canonical✓     -

Removi o Chromium para tentar liberar espaço no meu disco rígido. Atalhos para meus snaps, como Thunderbird ou Firefox, ainda aparecem no meu sistema, mas não consigo abri-los. Todos os meus dados de usuário parecem seguros na minha pasta pessoal — só não tenho ideia de como começar a limpar e reparar...

snap
  • 1 respostas
  • 172 Views
Martin Hope
killer_rabbit
Asked: 2019-02-10 15:44:29 +0800 CST

Novas regras estranhas adicionadas à minha configuração do iptables... Meu servidor foi hackeado?

  • 5

Hoje, listei meu iptables para uma verificação de rotina - e descobri duas regras UFW estranhas que não me lembro de ter configurado, referindo-se a dois endereços IP específicos que não consigo identificar:

-A ufw-before-input -d 224.0.0.251/32 -p udp -m udp --dport 5353 -j ACCEPT
-A ufw-before-input -d 239.255.255.250/32 -p udp -m udp --dport 1900 -j ACCEPT

Isso é meio assustador. Alguém conseguiu invadir meu servidor e adicionar essas regras? Se não, o que aconteceu?

(E se algum agente malicioso invadiu meu firewall, por que ele usaria as portas 5353 e 1900, que não estão sendo encaminhadas pelo meu roteador??)

iptables firewall ufw hacking
  • 2 respostas
  • 1904 Views

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Existe um comando para listar todos os usuários? Também para adicionar, excluir, modificar usuários, no terminal?

    • 9 respostas
  • Marko Smith

    Como excluir um diretório não vazio no Terminal?

    • 4 respostas
  • Marko Smith

    Como descompactar um arquivo zip do Terminal?

    • 9 respostas
  • Marko Smith

    Como instalo um arquivo .deb por meio da linha de comando?

    • 11 respostas
  • Marko Smith

    Como instalo um arquivo .tar.gz (ou .tar.bz2)?

    • 14 respostas
  • Marko Smith

    Como listar todos os pacotes instalados

    • 24 respostas
  • Martin Hope
    Flimm Como posso usar o docker sem sudo? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    led-Zepp Como faço para salvar a saída do terminal em um arquivo? 2014-02-15 11:49:07 +0800 CST
  • Martin Hope
    ubuntu-nerd Como descompactar um arquivo zip do Terminal? 2011-12-11 20:37:54 +0800 CST
  • Martin Hope
    TheXed Como instalo um arquivo .deb por meio da linha de comando? 2011-05-07 09:40:28 +0800 CST
  • Martin Hope
    Ivan Como listar todos os pacotes instalados 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    David Barry Como determino o tamanho total de um diretório (pasta) na linha de comando? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher "Os seguintes pacotes foram retidos:" Por que e como resolvo isso? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford Como os PPAs podem ser removidos? 2010-07-30 01:09:42 +0800 CST

Hot tag

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve