List:General Discussion« Previous MessageNext Message »
From:Mogens Melander Date:April 28 2007 5:19pm
Subject:RE: Permissions and Into Outfile
View as plain text  
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=1
>
>
> --
> 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.

Thread
Permissions and Into OutfileJohn Kebbel27 Apr
  • Re: Permissions and Into OutfileGerald L. Clark27 Apr
    • RE: Permissions and Into OutfileJohn Kebbel27 Apr
      • Re: Permissions and Into OutfileGerald L. Clark27 Apr
      • RE: Permissions and Into OutfileMogens Melander27 Apr
RE: Permissions and Into OutfileJohn Kebbel28 Apr
  • RE: Permissions and Into OutfileMogens Melander28 Apr
RE: Permissions and Into OutfileJohn Kebbel28 Apr