getmango / Mango

Mango is a self-hosted manga server and web reader
https://getmango.app
MIT License
1.69k stars 118 forks source link

[Question] I get Error opening file with mode 'w' #324

Open dranas85 opened 2 years ago

dranas85 commented 2 years ago

I get this on every manga. Error opening file with mode 'w': '/mnt/share/manga/1-Nen A-Gumi No Monster/info.json': Permission denied

the name of the manga changes, but the error is still the same. The credentials I use on the shared device are set for R/W permissions, so I am at a loss for how to fix it.

hkalexling commented 2 years ago

I guess the user owning the Mango process doesn't have write access to the file. Assuming you are using any UNIX system you can try the followings

  1. Find out the user that started the Mango process: ps -ef | grep mango
  2. List the permissions on the JSON file: ls -l /path/to/info.json
dranas85 commented 2 years ago

it states it doesn't exist. I checked the directory my self and it doesn't exist. How can I make them?

hkalexling commented 2 years ago

Ah so Mango was trying to create the file with w mode but failed, and that's why you got the error. Can you check the folder's owner and permissions using ls -l /path/to/folder? To be able to create files in it Mango needs both the write and execute permissions on the folder, so it should be something like rwx.

dranas85 commented 1 year ago

I checked the permissions, they have rwx but its root, not my user that has them

hkalexling commented 1 year ago

Then your library folder is owned by root. You might want to check why that happens. It could be that you were using sudo when creating the folder or mounting an external drive. You can change the owner back to your user using chown -R

dranas85 commented 1 year ago
It shows rwx however its all for root, not the actual user account I made. Matthew ArthursSent from Mail for Windows From: Alex LingSent: Sunday, July 24, 2022 4:09 AMTo: getmango/MangoCc: dranas85; AuthorSubject: Re: [getmango/Mango] [Question] I get Error opening file with mode 'w' (Issue #324) Ah so Mango was trying to create the file with w mode but failed, and that's why you got the error. Can you check the folder's owner and permissions using ls -l /path/to/folder? To be able to create files in it Mango needs both the write and execute permissions on the folder, so it should be something like rwx.—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>  This email has been checked for viruses by Avast antivirus software. www.avast.com