when I try to run gem install json -v 1.8.3
ERROR: While executing gem ... (Errno::EACCES)
Permission denied # rb_sysopen - /home/ulap10/.gem/gems/json-1.8.3/tests/test_json.rb
I tried to fix this by reclaiming ownership using - sudo chown -R ulap10 /home/ulap10/.gem/gems/json-1.8.3/tests/test_json.rb but it didn't work.
How can I resolve this?
Related
I am trying to run MySQL installed through HomeBrew on a Mac (High Sierra) but I am always having these problems of permissions and with the PID file. I have tried hundreds of possible solutions I found online, but I could not fix these issues:
Haline:/ Haline$ mysql.server start
Starting MySQL
./usr/local/Cellar/mysql/8.0.12/bin/mysqld_safe: line 144: /usr/local/var/mysql/Haline.local.err: Permission denied
/usr/local/Cellar/mysql/8.0.12/bin/mysqld_safe: line 144: /usr/local/var/mysql/Haline.local.err: Permission denied
/usr/local/Cellar/mysql/8.0.12/bin/mysqld_safe: line 199: /usr/local/var/mysql/Haline.local.err: Permission denied
/usr/local/Cellar/mysql/8.0.12/bin/mysqld_safe: line 144: /usr/local/var/mysql/Haline.local.err: Permission denied
ERROR! The server quit without updating PID file (/usr/local/var/mysql/Haline.local.pid).
Can anyone help me, pleeease?
According to the official troubleshooting page of Homebrew:
If commands fail with permissions errors, check the permissions of /usr/local’s subdirectories. If you’re unsure what to do, you can run cd /usr/local && sudo chown -R $(whoami) bin etc include lib sbin share var opt Cellar Caskroom Frameworks.
Alternatively, if you have not installed applications in /usr/local that rely on specific permissions, you can also run:
sudo chown -R $(whoami) /usr/local/*
I'm installing mariadb on ubuntu 16.04.
After Installed, when I run mysql status/start, it always throws the below error
root#3ab94b27a215:~# service mysql status
/usr/sbin/mysqld: error while loading shared libraries: liblz4.so.1: cannot open shared object file: Permission denied
* MariaDB is stopped.
I find the file here
root#3ab94b27a215:~# find / -name liblz4.so.1
/usr/lib/x86_64-linux-gnu/liblz4.so.1
I set 777 permission to /usr/lib/x86_64-linux-gnu/liblz4.so.1
chmod 777 /usr/lib/x86_64-linux-gnu/liblz4.so.1
but still the error not resolved.
can you please help me on this?
This worked for me :-
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
It also disables the AppArmor for MySQL on the system though.
Got from this issue
This is what worked for me
Follow the steps below to remove mysqld from the app armor:
$ echo "/usr/sbin/mysqld { }" | sudo tee /etc/apparmor.d/usr.sbin.mysqld
$ sudo apparmor_parser -v -R /etc/apparmor.d/usr.sbin.mysqld
$ sudo systemctl restart mariadb
Had the same problem after mariad install and changing datadir to /home/myuser/mysql. This was the issue: https://stackoverflow.com/a/41558145/4556066 ProtectHome=false
Apparently I can this error if I use 'sudo gem install jekyll' or 'gem install jekyll'
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Users/antonioortiz/.rvm/gems/ruby-1.9.3-p448/gems/ffi-1.9.3/ffi.gemspec
Appreciate the help!
Check folder permission, chmod to 755.
I am installing mysql using homebrew for Mac OS X. Once the installation completes these options are given in the terminal:
To connect:
mysql -uroot
To have launchd start mysql at login:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
Then to load mysql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Or, if you don't want/need launchctl, you can just run:
mysql.server start
So what I would like to do is have mysql started at login but when I enter the command I get permission denied like so:
$ ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
ln: /Users/xxxxxxxxxxxxxx/Library/LaunchAgents/homebrew.mxcl.mysql.plist: Permission denied
Any suggestions as to why this may be occuring?
Did you try sudo?
$ sudo ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
^^^^
I have similar issue while trying to run ln -s /Applications/ngrok ngrok. It returns permission denied. That means you need to allow Administrator to delegate a user to perform the operation. By prepending sudo will give that privilege and the system will prompt you for administrator password. sudo ln -s /Applications/ngrok ngrok
For more information on sudo.
This happened to me on a web server where I have limited access (no sudo), so what worked for me was putting the symbolic link under /home//bin instead. I was able to install custom apps that I needed and setup them to work globally in this way. Hope this might help someone.
I work in macosx v10.6.8 and i have :
- ruby v 1.9.3p385
- rails v 3.2.12
- gem 1.8.25
- mysql Ver 14.14 Distrib 5.6.10, for osx10.6 (i386) using EditLine wrapper
Whene in try gem builde install, i see this message error :
/Users/admin/.rvm/rubies/ruby-1.9.3-p385/bin/gem:4: warning: Insecure world writable dir /usr/local/mysql/bin in PATH, mode 040777
ERROR: While executing gem ... (RuntimeError)
Unknown command builde
I tape chmod -R 777 but same error.
And when i try gem install mysql2, i see this message error :
/Users/admin/.rvm/rubies/ruby-1.9.3-p385/bin/gem:4: warning: Insecure world writable dir /usr/local/mysql/bin in PATH, mode 040777
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Users/admin/.rvm/gems/ruby-1.9.3-p385/gems/mysql2-0.3.11/.gitignore
I clean that whith chmod -R 777 but again same error !!!
I need a help, tnx every body
Well the error is telling you that the 777 permission is a problem, it shouldn't be world writeable. I assume you're using this exclusively for local testing, try it with a 755 or 775 permission.