LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   read write permissions (https://www.linuxquestions.org/questions/linux-newbie-8/read-write-permissions-368180/)

petenyce 09-29-2005 12:51 PM

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

murder 09-29-2005 12:54 PM

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

tkedwards 09-30-2005 12:53 AM

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.


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