Unix Technical Forum

RE: Permissions and Into Outfile

This is a discussion on RE: Permissions and Into Outfile within the MySQL General forum forums, part of the MySQL category; --> I experimented with a local /var/www folder. I assumed setting 2, 6, or 7 for the Other value would ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 06:16 AM
John Kebbel
 
Posts: n/a
Default RE: Permissions and Into Outfile

I experimented with a local /var/www folder. I assumed setting 2, 6, or
7 for the Other value would give mysql write privileges, but mysql would
not settle for anything less than a 7 in that last slot. What was really
curious to me was that the User and Group settings were inconsequential.
I even set the folder for 007 and mysql could write to the folder. But
as soon as I tried making that Other setting anything less than 7, mysql
generated an error message.

I've been using Linux for years, but more as a hobby than profession
(though I do maintain an internal Mac OS X web server at my school). I
am unfamiliar with the syntax you were using with the username in front
of :mysql. I didn't know of any way other than chmod nnn to change
permissions for UGO (user,group,other). Could you post one or two sample
command line statements that illustrate this syntax in action. I did a
brief web search, but it only turned up the stuff I was familiar with.

Thanks to everyone who helped with this issue.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 06:16 AM
Mogens Melander
 
Posts: n/a
Default RE: Permissions and Into Outfile

Ok, on my linux (slackware 10) /var/www is owner by root.root with
permissions rwxr-xr-x (755). Say you want mysql to put your data
in a subdirectory under /var/www named data.

As root, do:

mkdir /var/www/data
chgrp mysql /var/www/data
chmod 775 /var/www/data

Now mysql has write permissions to /var/www/data

If you want a f.ex. PHP script to manipulate/change/delete
files generated by mysql, your webserver need r/w permissions
as well. I'm using apache2, so the daemon user need access.

chown daemon.mysql /var/www/data
or
chown mysql.daemon /var/www/data

That's it.

On Sat, April 28, 2007 04:04, John Kebbel wrote:
> I experimented with a local /var/www folder. I assumed setting 2, 6, or
> 7 for the Other value would give mysql write privileges, but mysql would
> not settle for anything less than a 7 in that last slot. What was really
> curious to me was that the User and Group settings were inconsequential.
> I even set the folder for 007 and mysql could write to the folder. But
> as soon as I tried making that Other setting anything less than 7, mysql
> generated an error message.
>
> I've been using Linux for years, but more as a hobby than profession
> (though I do maintain an internal Mac OS X web server at my school). I
> am unfamiliar with the syntax you were using with the username in front
> of :mysql. I didn't know of any way other than chmod nnn to change
> permissions for UGO (user,group,other). Could you post one or two sample
> command line statements that illustrate this syntax in action. I did a
> brief web search, but it only turned up the stuff I was familiar with.
>
> Thanks to everyone who helped with this issue.
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=mogens@fumlersoft.dk
>
>
> --
> This message has been scanned for viruses and
> dangerous content by OpenProtect(http://www.openprotect.com), and is
> believed to be clean.
>



--
Later

Mogens Melander
+45 40 85 71 38
+66 870 133 224



--
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:05 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com