LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-29-2005, 12:51 PM   #1
petenyce
Member
 
Registered: Sep 2005
Posts: 39

Rep: Reputation: 15
read write permissions


im trying to write a text file from my mysql database, i am the root@localhost user. i get the following error

Error 1 (HY000): Cant create/write to file '/usr/etc/referranl.txt' (errorcode: 13)

does this mean privilidges in mysql or my user name in linux?


thanks
 
Old 09-29-2005, 12:54 PM   #2
murder
LQ Newbie
 
Registered: Aug 2005
Posts: 29

Rep: Reputation: 15
do a
Code:
chmod 777 /usr/etc/referranl.txt
if that doesnt work or if the file doesnt exist to a
Code:
chmod 755 /usr/etc
or you can create the file from scratch so it will have something to write to

Last edited by murder; 09-29-2005 at 12:58 PM.
 
Old 09-30-2005, 12:53 AM   #3
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 51
Mysql doesn't run as root (the root@localhost thing is the mysql username which is seperate from the system users) so you probably won't be able to write to system directories such as /usr or anything under that. If its just temporary data you're writing it would be much better to just write it to /tmp - fiddling with the permissions on directories in /usr is generally a bad idea.

Otherwise is there a command that you are using to write that data out from mysql? A common trick is to use sudo to run that command as root, post back if u need to do this and I'll explain in more detail.
 
  


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
Samba ignoring read/write permissions? GT3NE1 Linux - Software 0 08-30-2004 05:23 PM
How do I change read/write permissions for a whole directory? Stevetgn Linux - Newbie 8 12-31-2003 07:41 AM
SAMBA Read/Write permissions Tenover Linux - Newbie 5 11-04-2003 12:45 PM
How to set permissions to read, execute, write for users only chupacabra Linux - General 3 12-18-2002 03:54 PM
read and write permissions for /dev/hda1... windows philfighter Linux - Security 3 10-27-2001 07:58 AM


All times are GMT -5. The time now is 11:45 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration