I installed Redis in Ubuntu 16.04 LTE and during configuration i have to edit redis.conf file, but unfortunately i could not be able to save the file, because file is having read-only access
-rw-r--r-- 1 root root 46695 Jan 18 19:57 redis.conf
I used chmod 777 redis.conf to get the access writes but it is not happening
chmod: changing permissions of 'redis.conf': Operation not permitted
Thanks in advance for your valuable solution
Operation not permitted is an error thrown when the user through which you logged in doesn't have permission, following should work if you have sudo privileges.
sudo vi redis.conf
OR
sudo nano redis.conf
OR
sudo gedit redis.conf
Choosing editor is based on your personal preferences.
Related
JupyterLab is in a gcp Deep learning vm.
Since few hours ago I can't save any changes in JupyterLab.
There are unsaved changes.
save notebook greyed out.
Also, if I try to delete a file from the left pane, it gives a 500 error.
The only change I recall making prior to this breaking is this. I had this error when I tried to do git operations in the command line.
Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
Therefore I did this
rm -f ./.git/index.lock
And the git command worked correctly. This the only thing I recall doing prior to this error.
Afterwards, I deleted the repository and recloned it.
And since I had to type sudo everytime I had the user claim the jupyter directory. But this error was there before I made this change.
udo chown your_username directory
Somehow group permissions for jupyter directory has changed to read and execute only. Simply adding write permissions solved this.
drwxr-xr-x 13 praveen jupyter 4096 Feb 9 11:46 jupyter
Command
chmod 771 /home/jupyter/
this has been useful to me :
chmod -R 777 /folder_name. The -R (or --recursive) options make it recursive.
Or if you want to make all the files in the current directory have all permissions type:
chmod -R 777 ./
Reference
I am getting the error The stream or file "/opt/lampp/htdocs/project/storage/logs/laravel-date.log" could not be opened: failed to open stream: Permission denied
I have tried setting the permissions as both 777 and 775. I suddenly started getting this error. Here's the ls -l output of the project.
drwxrwxr-x 15 root www-data 4096 Dec 2 2018 project
I am using XAMPP for my current development environment and not the native LAMPP stack.
Okay, so I read through a comment in here and changed my directory permissions to 777 for app and public folders. 775 for storage and the rest is 664. And it worked.
I have my application running on an ec2 instance.
I can successfully ssh into my application but when I cd in to the correct folder and run ls I get the following error:
ls: cannot open directory '.': Permission denied
It seems like it has something to do with my user permissions because running the application also throws a 403 Forbidden error.
The permissions for my application folder are as follows:
d-wx-wx--x 17 ubuntu ubuntu 4096 Apr 20 10:53 application-name
Do I need to change this to something else to make it work? And how?
This error makes sense if you don't have enough privileges to read that directory. try changing the permissions for current user or change the access mode to global i.e 777
For example:
sudo bash
chmod 775 .
This is basically caused when the current user doesn't have enough permission to read/write/execute the contents of that directory.
Here's how you can fix it:
To grant the user permission to just the current directory, you could do this:
sudo chmod 775 directory_name
OR
sudo chmod a+rwx,o-w directory_name
To grant the user permission to the current directory, it's subdirectories and files, you could do this:
sudo chmod -R 775 directory_name
OR
sudo chmod -R a+rwx,o-w directory_name
Note:
chmod means change mode or in a more literal sense change access permissions.
-R means change files and directories recursively.
a means all users
r means read permission
w means write permission
x means execute permission
o means others
+ means add
- means remove.
So it means recursively add read, write and execute permissions to everyone, but then remove write permissions from others.
That's all.
I hope this helps
You don't have read permission on your folder.
Run chmod 775 application-name to allow read in your folder.
You'll find additional info about chmod at this link: https://kb.iu.edu/d/abdb
All of a sudden I started getting "Permission Denied" issues when trying to run any gcloud commands such as gcloud components update -- the issue was avoided if I ran sudo gcloud components update but it's not clear to my why the sudo command is suddenly required? I have actually been trying to run a GCMLE experiment and it had the same error/warning, so I tried updating components and still ran into this issue. I have been travelling for a couple days and did not make any changes since these same commands worked a few days ago. Further, I did not changed my OS (Mac High Sierra 10.13.3) -- were there any changes on the Google side that might explain this change in behavior? What is the best course of action to permanently get around this warning?
(conda-env) MacBook-Pro:user$ gcloud components update
WARNING: Could not setup log file in /Users/$USERNAME/.config/gcloud/logs, (IOError: [Errno 13] Permission denied: u'/Users/$USERNAME/.config/gcloud/logs/2018.03.10/XX.XX.XX.XXXXXX.log')
after sudo gcloud components update I was able to kick off a GCMLE experiment, but I also get the same warning (though my job now submits successfully).
WARNING: Could not setup log file in /Users/#USERNAME/.config/gcloud/logs, (IOError: [Errno 13] Permission denied: u'/Users/$USERNAME/.config/gcloud/logs/2018.03.10/XX.XX.XX.XXXXXX.log')
Based on an answer to a similar question, you probably need to change the permissions to the appropriate directories:
sudo chown -R $USER ~/.config/gcloud
That same post suggests that permissions may have gotten out-of-whack by running a gcloud command with sudo.
In most cases, the problem is not caused by the ~/.config/gcloud directory but the installation directory of gcloud which is owned by root:
drwxr-xr-x 20 root staff 640 Jun 20 18:22 google-cloud-sdk
Solution:
You must change permissions for that directory to your user from:
by:
sudo chown -R $USER /Users/$USER/bin/google-cloud-sdk
I've been struggling with this for some time. I have Mysql 5.7.20 in my EC2 instance and want to set / change root password. So I do:
sudo /etc/init.d/mysql stop
sudo mysqld_safe --skip-grant-tables &
which gives the follow error:
mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists.
so I do:
mkdir -p /var/run/mysqld
which gives:
mkdir: cannot create directory ‘/var/run/mysqld’: Permission denied
Any idea how to solve this?
Is this what you are looking for?
MySQL 5.7 Reference Manual:
B.5.3.2 How to Reset the Root Password