LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-24-2007, 07:55 PM   #1
7trek
LQ Newbie
 
Registered: Jun 2007
Posts: 12

Rep: Reputation: 0
how to give all users read/write access to a file in the Firefox profile folder


I'm currently developing an extension for Firefox that requires the use of a sqlite database which is stored in the Firefox profile folder. While Firefox is in use the extension has to have constant access to the sqlite database to add/remove/clear entries from a few different tables. Everything seems to work fine when I'm logged in as root. However the problem occurs when I log in as a different user. Then when I open Firefox the extension doesn't seem to have access to the sqlite file in the profile folder. The odd thing is that no errors are thrown to the console so it would appear that the extension successfully finds the file it simply doesn't have read/write access to it. How can I allow all users access to the sqlite file in the Firefox profile folder?

Last edited by 7trek; 11-25-2007 at 12:43 AM.
 
Old 11-25-2007, 04:49 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Isn't that a design "mistake"? A FF profile folder is a "private" folder, it's user-centric: no other users should have or need access to that. If you need to make resources available globally, I mean to all users on the system, then you should 0) put it in a location that caters for that like /var/lib/something and set appropriate permissions or 1) use a type of database that avoids such problems making use of the ancient server-client paradigm. Fat chance I'm wrong, I don't know zilch about this ;-p
 
Old 11-25-2007, 05:09 PM   #3
7trek
LQ Newbie
 
Registered: Jun 2007
Posts: 12

Original Poster
Rep: Reputation: 0
Well, I think I've finally found the problem. I include the sqlite database in the extension.jar file and then extract it into the profile folder when Firefox loads. For some reason on Linux systems that file is extracted as read only, however on Solaris and Windows it's extracted as read/write. When I test the extension as the root user on Linux it works fine, but when I log in as a user with restricted privileges the extension can't access the database since it's read only.

The strange thing about this is that the sqlite file attributes were never set to read only. The extension was originally developed on the Windows platform and then ported to Linux and Solaris. As a test I decided to repackage the extension on Linux and see if it was still extracted as read only. To my surprise it turns out that if I create the xpi/jar archives on Linux then it extracts as read/write, but if I create the archives on Windows then it extracts as read only in Linux. I guess I still don't understand why this is happening but at least it's working now. Does anyone have an explanation for this issue?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Folder/File sharing and read/write access? JET-33 Linux - Server 2 04-04-2007 11:13 PM
Allowing normal users read-write access to Windows partitions Aphex_Twin2 Slackware 5 05-23-2005 09:22 AM
where a service should place a folder so every user can have read/write access. shahidawan Linux - Security 3 05-07-2005 01:25 PM
How to give a drive write access to all users in FSTAB? (ext3) jon_k Linux - Software 2 12-19-2004 09:46 PM
need multiple users to have read/write access to a Quickbooks file at the same time. rbelknap Linux - Security 2 10-14-2003 10:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration