You are not logged in.
Pages: 1
Hi,
while trying to run a .jar file as an user, I get this error:
java.io.FileNotFoundException: /home/waterquarks/.minecraft/libraries/optifine/OptiFine/1.12.2_HD_U_C6/OptiFine-1.12.2_HD_U_C6.jar (Permission denied)I don't want to execute the jar as root, because it would install the addon (it's for a game) in a not-so-friendly path, and because the game, on run, would ignore all the settings I have for the user. I have the ownership of the folder in which the file is located.
Any insight on this?
Thanks in advance!
EDIT: how do I format the log in a separate text box?
Last edited by waterquarks (2017-10-27 01:56:15)
Offline
Does this happen only with minecraft, or is it a problem with every .jar file? And when posting a lot of text or command output, you can use [ code ] Text here [ /code ] (remove the spaces in the [ code ] tags. https://bbs.archlinux.org/help.php#bbcode
Offline
Does this happen only with minecraft, or is it a problem with every .jar file? And when posting a lot of text or command output, you can use [ code ] Text here [ /code ] (remove the spaces in the [ code ] tags. https://bbs.archlinux.org/help.php#bbcode
It happens with every .jar file -well, any file that isn't specifically user created-. For example, I can only use sudo nano to edit config files, because if I use something like Notepadqq or gedit it would give me a "Permission denied" on any saving attempt. I think it has to do something with the permissions thing, but I already have myself in the sudoers with all root permissions.
Last edited by waterquarks (2017-10-27 01:58:58)
Offline
Can you paste the output of:
ls -l /home/waterquarks/.minecraft/libraries/optifine/OptiFine/1.12.2_HD_U_C6/Offline
Can you paste the output of:
ls -l /home/waterquarks/.minecraft/libraries/optifine/OptiFine/1.12.2_HD_U_C6/
Here it is:
[waterquarks@arch ~]$ ls -l /home/waterquarks/.minecraft/libraries/optifine/OptiFine/1.12.2_HD_U_C6/
total 1904
-rw-r--r-- 1 root root 1949014 Oct 26 18:09 OptiFine-1.12.2_HD_U_C6.jar
[waterquarks@arch ~]$ Offline
Yep, permission error. That file is owned by root, so only the root user (or your user using sudo) can use it. You can use
chown youruser:youruser OptiFine-1.12.2_HD_U_C6.jarand see if that helps. If it doesn't, you may need to keep going to the parent directory until all files are owned by you.
Offline
Yep, permission error. That file is owned by root, so only the root user (or your user using sudo) can use it. You can use
chown youruser:youruser OptiFine-1.12.2_HD_U_C6.jarand see if that helps. If it doesn't, you may need to keep going to the parent directory until all files are owned by you.
It worked, thank you!
Offline
No problem ![]()
Make sure you mark your thread as solved by editing the first post and prepending [SOLVED] to the title.
Offline
[
It happens with every .jar file -well, any file that isn't specifically user created-. For example, I can only use sudo nano to edit config files, because if I use something like Notepadqq or gedit it would give me a "Permission denied" on any saving attempt. I think it has to do something with the permissions thing, but I already have myself in the sudoers with all root permissions.
Well, you wouldn't normally use a graphical text editor to edit system configuration files, would you? If you're talking about files in your home directory, there is something very wrong indeed if you need sudo to edit them at all - and using sudo to edit them will only make matters worse.
How did that jar file come to be owned by root in the first place?
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Pages: 1