winapps icon indicating copy to clipboard operation
winapps copied to clipboard

winapps-setup Uninstall fails due to permission issues on NixOS

Open Seeker0472 opened this issue 2 years ago • 7 comments

Description:

I attempted to install the winapps project on NixOS using the feat-nix-packaging branch with home-manager. However, I encountered issues when running winapps-setup uninstall. The process fails with the following error messages:

/nix/store/byqm06p6dbnl2kwi4r347jc7yw04b8w1-winapps-git+07817afe0c2cad15c4eb90b5c94261a2b4d365d4/bin/.winapps-setup-wrapped: line 151: [: /nix
/store/byqm06p6dbnl2kwi4r347jc7yw04b8w1-winapps-git+07817afe0c2cad15c4eb90b5c94261a2b4d365d4/bin: integer expression expected
WinApps installation already present at /nix/store/byqm06p6dbnl2kwi4r347jc7yw04b8w1-winapps-git+07817afe0c2cad15c4eb90b5c94261a2b4d365d4/src. 
Updating...                        
REMOVING USER INSTALLATION.        
rm: cannot remove '/home/seeker/.local/share/winapps/apps/explorer/icon.svg': Permission denied                                               
rm: cannot remove '/home/seeker/.local/share/winapps/apps/explorer/info': Permission denied                                                   
rm: cannot remove '/home/seeker/.local/share/winapps/apps/cmd/icon.svg': Permission denied                                                    
rm: cannot remove '/home/seeker/.local/share/winapps/apps/cmd/info': Permission denied                                                        
rm: cannot remove '/home/seeker/.local/share/winapps/apps/excel-o365/icon.svg': Permission denied                                             
rm: cannot remove '/home/seeker/.local/share/winapps/apps/excel-o365/info': Permission denied                                                 
rm: cannot remove '/home/seeker/.local/share/winapps/apps/powerpoint-o365/icon.svg': Permission denied                                        
rm: cannot remove '/home/seeker/.local/share/winapps/apps/powerpoint-o365/info': Permission denied                                            
rm: cannot remove '/home/seeker/.local/share/winapps/apps/powershell/icon.svg': Permission denied                                             
rm: cannot remove '/home/seeker/.local/share/winapps/apps/powershell/info': Permission denied                                                 
rm: cannot remove '/home/seeker/.local/share/winapps/apps/word-o365/icon.svg': Permission denied                                              
rm: cannot remove '/home/seeker/.local/share/winapps/apps/word-o365/info': Permission denied                                                  
Exiting with status '1'.           

I had to manually use sudo rm -rf ~/.local/share/winapps/apps to remove the files. Here are the permissions of the files in ~/.local/share/winapps/apps:

share/winapps/apps ❯ ls -al
total 32
drwxr-xr-x 8 seeker users 4096 Oct 15 17:52 .
drwxr-xr-x 3 seeker users 4096 Oct 16 21:23 ..
dr-xr-xr-x 2 seeker users 4096 Oct 15 17:52 cmd
dr-xr-xr-x 2 seeker users 4096 Oct 15 17:52 excel-o365
dr-xr-xr-x 2 seeker users 4096 Oct 15 17:52 explorer
dr-xr-xr-x 2 seeker users 4096 Oct 15 17:52 powerpoint-o365
dr-xr-xr-x 2 seeker users 4096 Oct 15 17:52 powershell
dr-xr-xr-x 2 seeker users 4096 Oct 15 17:52 word-o365

Steps to Reproduce:

  • Install winapps on NixOS using the feat-nix-packaging branch with home-manager. Here are my dotfiles:https://github.com/Seeker0472/nixos
  • Run winapps-setup Install -> Current User ->Manual (Default) -> Set up all detected officially supported applications -> Set up all detected applications ->
  • Run winapps-setup Uninstall -> Current User and runs into error

Expected Behavior:

The uninstall process should complete without permission errors.

Actual Behavior:

The uninstall process fails due to permission issues, requiring manual intervention with sudo.

System Information:

OS: NixOS 24.11.20241014.a3c0b3b (Vicuna) x86_64 
DE: none+dwm 
WM: dwm
Branch: feat-nix-packaging

Seeker0472 avatar Oct 16 '24 14:10 Seeker0472

By the way, I see in your dotfiles you manually installed dialog and freerdp3, you don't need to do that

oskardotglobal avatar Oct 16 '24 16:10 oskardotglobal

By the way, I see in your dotfiles you manually installed dialog and freerdp3, you don't need to do that

Okey

Seeker0472 avatar Oct 17 '24 02:10 Seeker0472

By the way, I see in your dotfiles you manually installed dialog and freerdp3, you don't need to do that

However, remove the dialog and freerdp3 results in an error :FreeRDP version 3 is not installed

Seeker0472 avatar Oct 28 '24 11:10 Seeker0472

@Seeker0472 Please try the latest commit, it should fix your issue.

oskardotglobal avatar Oct 30 '24 08:10 oskardotglobal

@Seeker0472 Please try the latest commit, it should fix your issue.

It seems to fix another Issue #300 however ,the Uninstall process still gives this error.

WinApps installation already present at /nix/store/xzfk089plfq4rakk9wamv32avrci34bm-winapps-0-unstable-2024-10-09/src. Updating...
REMOVING USER INSTALLATION.
rm: cannot remove '/home/seeker/.local/share/winapps/apps/explorer/icon.svg': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/explorer/info': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/cmd/icon.svg': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/cmd/info': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/iexplorer/icon.svg': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/iexplorer/info': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/powershell-ide/icon.svg': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/powershell-ide/info': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/excel-o365/icon.svg': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/excel-o365/info': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/powerpoint-o365/icon.svg': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/powerpoint-o365/info': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/onenote-o365/icon.svg': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/onenote-o365/info': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/powershell/icon.svg': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/powershell/info': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/word-o365/icon.svg': Permission denied
rm: cannot remove '/home/seeker/.local/share/winapps/apps/word-o365/info': Permission denied
Exiting with status '1'.

Seeker0472 avatar Nov 01 '24 01:11 Seeker0472

@Seeker0472 I think I've got it, please try again with the latest commit, the issue no longer occurs on my machine aswell.

oskardotglobal avatar Nov 01 '24 11:11 oskardotglobal

@Seeker0472 I think I've got it, please try again with the latest commit, the issue no longer occurs on my machine aswell.

@oskardotglobal Yes,It's works perfectly. You did a great job! Thank you so much for your help!

Seeker0472 avatar Nov 01 '24 12:11 Seeker0472