Error Writing /etc/mysql/my.cnf Permission Denied
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki Other Support Launchpad Answers Ubuntu how to edit my.cnf file in linux IRC Support AskUbuntu Official Documentation User Documentation Social Media Facebook Twitter Useful Links restart mysql ubuntu Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Official Flavours Support Installation & Upgrades [SOLVED] Permission denied problem. Bug? Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Results 1 to 7 of 7 Thread: Permission denied problem. Bug? Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode March 31st, 2010 #1 ArtemNY View Profile View Forum Posts Private Message Just Give Me the Beans! Join Date Mar 2010 Location Brooklyn, NY Beans 53 DistroUbuntu 9.10 Karmic Koala Permission denied problem. Bug? Reinstalled a fresh copy of Ubuntu 9.10. Accordingly to the official manual installed LAMP. Using: Code: sudo tasksel install lamp-server Last step is to change my ip in my.cnf. Opened it with the command terminal. Tried both: Code: nano /etc/mysql/my.cnf and Code: $ sudo nano /etc/mysql/my.cnf Changed my ip. Tried to save and: Code: Error writing /etc/mysql/my.cnf: Permission denied Tried to manually open my.cnf, change my ip and save it and: Code: Could not save the file /etc/mysql/my.cnf. You do not have the permissions necessary to save the file. Please check that you typed the location correctly and try again. I didn't install anything before that, not even updates. Just installed LAMP on a fresh copy of Ubuntu. Is this a bug or what? Last edited by ArtemNY; March 31st, 2010 at 03:56 AM. Adv Reply March 31st, 2010 #2 ArtemNY View Profile View Forum Posts Private Message Just Give Me the Beans! Join Date Mar 2010 Location Brooklyn, NY Beans 53 DistroUbuntu 9.10 Karmic Koala Re: Permission denied problem. Bug? Can it be possibly a broken Ubuntu? Maybe it's been downloaded with mistakes? Ad
Forums Hosting Security and Technology Unable to save changes in my.cnf If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 6 of 6 Thread: Unable to save changes in my.cnf Tweet Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 06-13-2007,08:28 AM #1 Im_Goodspeed View Profile View Forum Posts View https://ubuntuforums.org/showthread.php?t=1443302 Forum Threads Junior Guru Join Date Jul 2003 Posts 222 Unable to save changes in my.cnf Very strange problem. As root I can't save any changes inside my.cnf. Allways getting this error: Could not open file for writing: Permission denied I checked file permissions twice - everything seems to be normal. How can I fix it? Thanks! Whoever wants everything has nothing Reply With Quote 0 06-13-2007,08:51 AM #2 Techbrace View Profile http://www.webhostingtalk.com/showthread.php?t=612509 View Forum Posts View Forum Threads Visit Homepage Web Hosting Guru Join Date Jul 2006 Location On top of the Servers Posts 323 Let us know what is the output from the following commands: lsattr /etc/my.cnf ls -l /etc/my.cnf ls -ld /etc lsattr -d /etc || Techbrace :: 24 x 7 Outsourced Web Hosting Support since 2006 || For Hosting Companies & Data Centres :: Helpdesk / Chat / Phone / Social Media :: cPanel / Plesk / DirectAdmin || Dedicated / VPS / Cloud Server Management :: Server Support On Demand :: Fully Managed Servers Reply With Quote 0 06-13-2007,09:09 AM #3 SparkSupport View Profile View Forum Posts View Forum Threads Visit Homepage Web Hosting Master Join Date May 2006 Location India Posts 661 If the permission has -ia- flag set you can remove this by issuing the command chattr -ia /etc/my.cnf After this you will be able to make the changes ██ SparkSupport.Com - The Premier Tech Company ██ Cloud Solutions|Email Infra setup|VOIP|Video Streaming|Software Development ██ Email: [emailprotected] █ Phone : 1- 408-600-1449 | Skype : shijils Reply With Quote 0 06-13-2007,09:20 AM #4 Im_Goodspeed View Profile View Forum Posts View Forum Threads Junior Guru Join Date Jul 2003 Posts 222 Thanks for the answewrs guys! Here is output for these commands: Code: [emailpr
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the http://askubuntu.com/questions/322364/how-to-let-mysql-mysqld-to-create-and-write-to-var-run-mysqld-directory workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags http://www.vikasing.com/2009/09/pita-2-edit-mycnf-file-in-ubuntu.html Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how error writing it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top How to let MySQL (mysqld) to create and write to “/var/run/mysqld” directory? up vote 0 down vote favorite 1 I really don't understand how all those privileges work in Linuxes. To start MySQL server mysqld program has to write its error writing /etc/mysql/my.cnf .pid files to /var/run/mysqld/ directory. But we know from FHS (Filesystem Hierarchy Standard) that: Files under this directory must be cleared (removed or truncated as appropriate) at the beginning of the boot process. So mysqld has to create /mysqld directory under /var/run/ every time MySQL server is started. The owner and group of /var is root and /var is: drwxr-xr-x 13 root root 4096 may 20 23:41 var. And we also know from FHS (Filesystem Hierarchy Standard) that: /var/run should be unwritable for unprivileged users (root or users running daemons); it is a major security problem if any user can write in this directory. So mysqld cannot write to the directory. Indeed when I run mysqld to start MySQL server I always get an error: user@user-desktop:~$ sudo mysqld --console 130720 23:43:02 [ERROR] Can't start server : Bind on unix socket: Permission denied 130720 23:43:02 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ? 130720 23:43:02 [ERROR] Aborting The question is: how mysqld can write .pid files to /var/run/mysqld/ if standard forbids to open this directory for w
edit etc/mysql/my.cnf and gedit etc/mysql/my.cnf also tried to change the permission of the file and the mysql folder by chmod with no success.Until I found out putting sudo is necessary before every command if the user account is not root.http://ubuntuforums.org/showthread.php?p=7077569Used sudo gedit etc/mysql/my.cnf and it worked. Labels: PITA, Teq Newer Post Older Post Home Subscribe to: Post Comments (Atom) Follow @vikasing My latest project JustDoc Blog Archive ► 2015 (3) ► May (1) ► March (1) ► February (1) ► 2014 (3) ► November (1) ► August (2) ► 2013 (9) ► December (1) ► September (1) ► June (3) ► February (3) ► January (1) ► 2012 (3) ► November (1) ► April (1) ► March (1) ► 2011 (2) ► July (1) ► June (1) ► 2010 (6) ► November (1) ► October (1) ► January (4) ▼ 2009 (16) ► December (2) ► November (2) ► October (3) ▼ September (1) PITA 2: Edit my.cnf file in Ubuntu ► August (1) ► July (1) ► June (2) ► May (4) Google+ Followers Powered by Blogger.