firefox extension don't have write permission on MAC OS X

I have a Firefox extension need to write to one files inside the extension's chrome folder, it works fine on windows and linux, but it give me 0x800520015 NS_ERROR_FILE_ACCESS_DENIED error. it is very strange, I manually set the file to have write permission, it works fine then.

My question is where should I set something to tell MAC OS to give write permission to that file.

Thanks.

13.10.2009 21:21:30
Edited to include information from the latter comment. My answer is also updated.
Nickolay 31.10.2009 05:47:55
(missed your other comment to my reply, answered it in the comments too.)
Nickolay 20.11.2009 07:37:27
1 ОТВЕТ
РЕШЕНИЕ

Which "chrome" folder (post the path)? If you're talking about application's chrome folder, it's a bad idea to write there; newer Windows will not let you do that either.

[edit] so if it's in the extension, you may have the wrong permissions set in your XPI file accidentally. You can change the permissions from your extension (see nsIFile.permissions) or create a proper ZIP while packaging. (Can you post the ZIP file to verify?)

Anyway, why do you want to write to extension's folder? It's usually a bad idea.

2
31.10.2009 05:45:56
~/Library/Application Support/Firefox/Profiles/[The Profile they are using]/extensions/[extension GUID]/chrome/ Where the extension installed. Thanks for the reply. It works fine in Windows and Linux.
user167466 30.10.2009 22:32:18
@Nickolay, thanks a lot for the help. I need to store some information on hard drive, so I don't have to access remote servers to check every second, close to some cache file. Where is the best place to store those caches? You mean inside my extension, I can programmatically change the permission for those cache files? I am a little bit confused about the way to create a proper zip while packaging, could you please give me more detail about that? Thanks a lot.
user167466 31.10.2009 22:26:45
@Nickolay, thanks a lot, I finally solved the issue by using your suggestion, set the nsIFile.permissions. Thanks a lot for the help.
user167466 20.11.2009 00:28:07
"Where is the best place to store those caches?" - somewhere in the profile folder ("ProfD"), but not along with your extension's code, since it's auto-updated.
Nickolay 20.11.2009 07:28:40
"confused about the way to create a proper zip while packaging" - dunno either. I would expect that zipping a folder with properly set permissions, using a permission-aware zip utility, would create a proper zip, but I don't know for sure.
Nickolay 20.11.2009 07:36:56