[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

sqlite3/activer record permissions problem (no ror

ddjolley

2/6/2009 3:03:00 AM

I'm using Ruby and ActiveRecord in a web environment (no ror). The
database is sqlite3. sqlite3-ruby is installed. I can add records to
the database from Ruby scripts using ActiveRecord just fine provided
that I am root. However, as any other user it bombs out with the error
message shown below. If this is going to work for me, I need to have
the user 'Apache' be able to add records to the database. Can anyone
please tell me what the problem is and how I might fix it. Thanks for
any input. Here is the relevant part of the error message:

/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:150:in
`log': SQLite3::SQLException: SQL logic error or missing database:
INSERT INTO news
--
Posted via http://www.ruby-....

7 Answers

Patrick Doyle

2/6/2009 1:03:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

My guess is that the sqlite database is owned by root (or by anybody other
than the user 'Apache') and does not have world write privileges. Look at
the permissions on the database file.

--wpd


On Thu, Feb 5, 2009 at 10:02 PM, Doug Jolley <ddjolley@gmail.com> wrote:

> I'm using Ruby and ActiveRecord in a web environment (no ror). The
> database is sqlite3. sqlite3-ruby is installed. I can add records to
> the database from Ruby scripts using ActiveRecord just fine provided
> that I am root. However, as any other user it bombs out with the error
> message shown below. If this is going to work for me, I need to have
> the user 'Apache' be able to add records to the database. Can anyone
> please tell me what the problem is and how I might fix it. Thanks for
> any input. Here is the relevant part of the error message:
>
>
> /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:150:in
> `log': SQLite3::SQLException: SQL logic error or missing database:
> INSERT INTO news
> --
> Posted via http://www.ruby-....
>
>

ddjolley

2/6/2009 5:05:00 PM

0

> My guess is that the sqlite database is owned by root (or by anybody
> other than the user 'Apache') and does not have world write privileges.
> Look at the permissions on the database file.

Unfortunately, the database is owned by 'apache' and assigned to the
group 'apache'. In addition, at the moment the database has world write
permissions. I am hopeful that after I get this problem resolved, the
write permissions can be restricted to a single user, presumably
'apache'. Thanks for your input. I should have mentioned those facts
in my post.

... doug


--
Posted via http://www.ruby-....

ddjolley

2/6/2009 6:03:00 PM

0

FWIW, I just got this working by making the directory that contains the
database owned by 'apache' and and assigned to the 'apache' group.
Thanks for the help.

... doug
--
Posted via http://www.ruby-....

Jeremy Hinegardner

2/8/2009 7:43:00 AM

0

On Sat, Feb 07, 2009 at 03:02:31AM +0900, Doug Jolley wrote:
> FWIW, I just got this working by making the directory that contains the
> database owned by 'apache' and and assigned to the 'apache' group.
> Thanks for the help.
>
> ... doug

That would be because sqlite needs write permissions to the directory so it may
create the .journal file.

enjoy,

-jeremy

--
========================================================================
Jeremy Hinegardner jeremy@hinegardner.org


Che

7/12/2013 12:22:00 PM

0

On Friday, July 12, 2013 12:47:00 AM UTC-5, Alphonsus Jr. wrote:

> The recording is indeed from 2006.<

Indeed it is not! That recording was released in 1971.

http://www.discogs.com/Christopher-Parkening-Parkening-Plays-Bach/relea...


Slogoin

7/12/2013 1:39:00 PM

0

On Thursday, July 11, 2013 10:47:00 PM UTC-7, Alphonsus Jr. wrote:
> The recording is indeed from 2006.
>
So this is not how you currently play... is this another stupid game...
>
> As for Parkening, the animus against him is rooted in today's neopagan anti-Christianity.

Bull.

tombrown@jhu.edu

7/12/2013 4:02:00 PM

0

On Friday, July 12, 2013 1:47:00 AM UTC-4, Alphonsus Jr. wrote:
> The recording is indeed from 2006.
>
> As for Parkening, the animus against him is rooted in today's neopagan anti-Christianity.>

I love his Bach records, and I really don't care whose fairy tales he believes in.