Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Database file permissions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
celloandy
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2003
Posts: 113
Location: Washington, DC

PostPosted: Tue Jun 13, 2006 3:45 pm    Post subject: Database file permissions Reply with quote

First, an initial disclaimer: this is not a Gentoo question, so if posting off-topic is a problem, I apologize, but I haven't had any luck elsewhere and have found, in general, that people here are more knowledgable than most about Unix/Linux issues, so I figured it was worth a go. Sorry if that's a problem.

I'm working a web site for a student organization at my university that will go on the school's main webserver, and will be written in Coldfusion (unfortunately, that's the only option). Student organizations don't have access to the database server, so I'm planning on using the SmallSQL file-based SQL engine for minimal database stuff via JDBC. My issue, though, is that I need to be able to read and write to the database, but the script will run as the webserver user (I think... there may be a separate ColdFusion user, but I don't think so), so the only way I've been able to get the thing to work is to make the database files world-writeable, but that makes me really nervous, as it's a shared system. I thought about trying to figure out some way of forking a separate process to do the database work and setuid'ing it, but I don't think ColdFusion will let me do that. Any thougts on how I might go about letting my scripts manipulate my DB without letting the whole world write to it?

Andrew

(Oh, and the machine is running Solaris 9 and Apache, if it matters.)
Back to top
View user's profile Send private message
jonnevers
Veteran
Veteran


Joined: 02 Jan 2003
Posts: 1594
Location: Gentoo64 land

PostPosted: Tue Jun 13, 2006 3:47 pm    Post subject: Re: Database file permissions Reply with quote

celloandy wrote:
Any thougts on how I might go about letting my scripts manipulate my DB without letting the whole world write to it?

Andrew

(Oh, and the machine is running Solaris 9 and Apache, if it matters.)

contact the administrator and have then chown the SQLLite db file to the user apache run's as. or better chgrp it to the apache user's group so it can read it but leave it owned by you so you can manipulate it too. chgrp + chmod or just a straight up chown.
Back to top
View user's profile Send private message
celloandy
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2003
Posts: 113
Location: Washington, DC

PostPosted: Tue Jun 13, 2006 3:50 pm    Post subject: Re: Database file permissions Reply with quote

jonnevers wrote:
contact the administrator and have then chown the SQLLite db file to the user apache run's as. or better chgrp it to the apache user's group so it can read it but leave it owned by you so you can manipulate it too. chgrp + chmod or just a straight up chown.


I'll try that if nothing else works, but I'm pretty sure they'll say no. Our admins are pretty Draconian, so my preference would be a technical solution, if there is one.

Andrew
Back to top
View user's profile Send private message
thepustule
Apprentice
Apprentice


Joined: 22 Feb 2004
Posts: 212
Location: Toronto, Canada

PostPosted: Tue Jun 13, 2006 4:46 pm    Post subject: Reply with quote

world-writeable should not be necessary.

Just use a group.
Back to top
View user's profile Send private message
celloandy
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2003
Posts: 113
Location: Washington, DC

PostPosted: Tue Jun 13, 2006 10:19 pm    Post subject: Reply with quote

thepustule wrote:
world-writeable should not be necessary.

Just use a group.


Again, that would be nice, but I don't have root on the box (it's the main school server), and my account isn't in any groups that the webserver is also in, so this would also take intervention on behalf of the admins. I'm thinking that there's really no way around this, and the database won't contain any sensitive information or anything, so I'll probably just do regular backups and trust the other users not to deface my data...

Andrew
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum