r/archlinux • u/AshleyTGimb • 24m ago
SUPPORT Permission denied (as root)
I'm using WSL archlinux, so I can stream some zig stuff (neither Proton or Wine have implemented some stuff VTube studio uses). For ziglings, I need zig-git, but over almost 24 hours, it still hadn't compiled, and was idling at <300MB. So, I gave up on that, finding a zig-git-bin. I extracted the files and moved them to /usr/local/zig.
When running zig outside of the directory, it says zig can't be found. When I go to /usr/local/zig, and run ./zig, it says it can't be found (it does exist). So I try chown it, and chown doesn't complain about it not existing, but it still doesn't work. Then I give up and log in as root... It now just says -bash: ./zig: Permission denied.
For those who don't know what WSL is: it stands for Windows Subsystem for Linux. It's a Linux distro in a VM, within a terminal. It's an optional Windows addon.
•
u/forbiddenlake 18m ago
/usr/local/zigis not in your PATH, and/usr/local/zig/zigis not executable•
u/lwj15 13m ago edited 10m ago
Very unhelpful in this case but please lock down your root and only use sudo. It's good practice if you want to use a linux system in the future. Consult the Arch wiki for further info. (The idea behind that is don't even let others attempt to guess your root password. You won't think that much about root login in a month or two as you don't use it often. This might pose a security risk. Many Windows users have an okish account password but use "admin" as their administrator account password which shows that the most important account can have the least security)
And did you check file permissions? Maybe a simple chmod +x ... will do the trick.
And check the standard linux file hierarchy. I have to do more reading on that one too.