Mango icon indicating copy to clipboard operation
Mango copied to clipboard

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

Open dranas85 opened this issue 3 years ago • 6 comments

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.

dranas85 avatar Jul 23 '22 19:07 dranas85

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

hkalexling avatar Jul 24 '22 05:07 hkalexling

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

dranas85 avatar Jul 24 '22 05:07 dranas85

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.

hkalexling avatar Jul 24 '22 11:07 hkalexling

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

dranas85 avatar Jul 25 '22 06:07 dranas85

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

hkalexling avatar Aug 01 '22 11:08 hkalexling

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

dranas85 avatar Oct 11 '22 08:10 dranas85