Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ya pack -u and ya pack -d Access is denied. (os error 5) #2318

Closed
2 of 3 tasks
sibouras opened this issue Feb 10, 2025 · 8 comments · Fixed by #2319
Closed
2 of 3 tasks

ya pack -u and ya pack -d Access is denied. (os error 5) #2318

sibouras opened this issue Feb 10, 2025 · 8 comments · Fixed by #2319
Labels
bug Something isn't working

Comments

@sibouras
Copy link

sibouras commented Feb 10, 2025

What system are you running Yazi on?

Windows

What terminal are you running Yazi in?

Windows Terminal v1.22.10352.0

yazi --debug output

Yazi
    Version: 25.2.7 (17ff1e8 2025-02-07)
    Debug  : false
    Triple : x86_64-pc-windows-msvc (windows-x86_64)
    Rustc  : 1.84.1 (e71f9a9a 2025-01-27)

Ya
    Version: 25.2.7 (17ff1e8 2025-02-07)

Emulator
    TERM                : None
    TERM_PROGRAM        : None
    TERM_PROGRAM_VERSION: None
    Brand.from_env      : Some(Microsoft)
    Emulator.detect     : Emulator { kind: Left(Microsoft), light: false, cell_size: Some((10, 20)) }
    Emulator.detect_full: Ok(Emulator { kind: Right(Unknown { kgp: false, sixel: true }), light: false, cell_size: Some((10, 20)) })

Adapter
    Adapter.matches: Sixel

Desktop
    XDG_SESSION_TYPE           : None
    WAYLAND_DISPLAY            : None
    DISPLAY                    : None
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: None
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Neovim
    NVIM          : false
    Neovim version: 0.10.4

Variables
    SHELL           : None
    EDITOR          : Some("hx")
    VISUAL          : None
    YAZI_FILE_ONE   : None
    YAZI_CONFIG_HOME: None
    YAZI_ZOXIDE_OPTS: None
    FZF_DEFAULT_OPTS: None

Text Opener
    default     : Some(Opener { run: "hx %*", block: true, orphan: false, desc: "hx", for_: None, spread: true })
    block-create: Some(Opener { run: "hx %*", block: true, orphan: false, desc: "hx", for_: None, spread: true })
    block-rename: Some(Opener { run: "hx %*", block: true, orphan: false, desc: "hx", for_: None, spread: true })

Multiplexers
    TMUX               : false
    tmux version       : program not found
    tmux build flags   : enable-sixel=Unknown
    ZELLIJ_SESSION_NAME: None
    Zellij version     : program not found

Dependencies
    file          : 5.45
    ueberzugpp    : program not found
    ffmpeg/ffprobe: 7.1 / 7.1
    pdftoppm      : program not found
    magick        : program not found
    fzf           : 0.57.0
    fd/fdfind     : 10.2.0 / program not found
    rg            : 14.1.1
    chafa         : program not found
    zoxide        : 0.9.7
    7zz/7z        : program not found / 24.08
    jq            : 1.7.1

Clipboard
    wl-copy/paste: program not found / program not found
    xclip        : program not found
    xsel         : program not found

Describe the bug

when using ya pack -d and ya pack -u i get Access is denied. (os error 5)

 ➜ ya pack -d yazi-rs/plugins:max-preview

  Deleting package `max-preview.yazi`

failed to delete `C:\Users\ala\AppData\Roaming\yazi\config\plugins/max-preview.yazi\main.lua`: Access is denied. (os error 5)
 ~\AppData\Roaming\yazi\config 1
 ➜ ya pack -u

  Upgrading package `max-preview.yazi`

HEAD is now at 8945e54 fix: missing ipairs in fallback_builtin, fixes #65

  Deploying package `max-preview.yazi`

failed to copy `C:\Users\ala\AppData\Roaming\yazi\state\packages\3db547c6a883e54d90397a0bac9b736f\max-preview.yazi\main.lua` to `C:\Users\ala\AppData\Roaming\yazi\config\plugins/max-preview.yazi\main.lua`: Access is denied. (os error 5)

Minimal reproducer

ya pack -a yazi-rs/plugins:max-preview
ya pack -d yazi-rs/plugins:max-preview
ya pack -u

Anything else?

No response

Checklist

  • I tried the latest nightly build, and the issue is still reproducible
  • I updated the debug information (yazi --debug) input box to the nightly that I tried
  • I can reproduce it after disabling all custom configs/plugins (mv ~/.config/yazi ~/.config/yazi-backup)
@sibouras sibouras added the bug Something isn't working label Feb 10, 2025
@sxyazi
Copy link
Owner

sxyazi commented Feb 10, 2025

No debug info

@sxyazi sxyazi added invalid This doesn't seem right and removed bug Something isn't working labels Feb 10, 2025
@sxyazi
Copy link
Owner

sxyazi commented Feb 10, 2025

Are you sure you have the right permission for the C:\Users\ala\AppData\Roaming\yazi\config\plugins directory?

I can't reproduce it on my Windows VM:

ya pack -a yazi-rs/plugins:max-preview

  Upgrading package `max-preview.yazi`

Cloning into 'C:\Users\Ika\AppData\Roaming\yazi\state\packages\3db547c6a883e54d90397a0bac9b736f'...
remote: Enumerating objects: 720, done.
remote: Counting objects: 100% (135/135), done.
remote: Compressing objects: 100% (95/95), done.
remote: Total 720 (delta 71), reused 73 (delta 40), pack-reused 585 (from 1)
Receiving objects: 100% (720/720), 166.34 KiB | 1.05 MiB/s, done.
Resolving deltas: 100% (452/452), done.

  Deploying package `max-preview.yazi`

Done!
./ya -V
Ya 25.2.7 (17ff1e8 2025-02-07)

@sxyazi sxyazi added the waiting on op Waiting for more information from the original poster label Feb 10, 2025
@sxyazi
Copy link
Owner

sxyazi commented Feb 10, 2025

Based on https://users.rust-lang.org/t/access-is-denied-os-error-5/109515/17, it seems like antivirus software is blocking Yazi from installing the plugin. Could you temporarily disable the antivirus or add Yazi to the allowlist?

@sibouras
Copy link
Author

sibouras commented Feb 10, 2025

ya pack -a works corretly, the error happens witth ya pack -d and ya pack -u, antivirus is disabled and i still get the issue, before v25.2.7 ya pack -u works. this is probably because the plugin files are readonly(not sure). here's a demo

ya-pack-access-err.mp4

@github-actions github-actions bot removed the waiting on op Waiting for more information from the original poster label Feb 10, 2025
@sibouras
Copy link
Author

No debug info

updated the original issue to include debug info

@sxyazi
Copy link
Owner

sxyazi commented Feb 10, 2025

Thanks for the info, will look into it

@sxyazi
Copy link
Owner

sxyazi commented Feb 10, 2025

Please try #2319

@sxyazi sxyazi added bug Something isn't working and removed invalid This doesn't seem right labels Feb 10, 2025
@sibouras
Copy link
Author

works now thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants