Can't execute command chmod 0777 * -R in CentOS 7 - permissions

I am trying to execute command chmod 0777 * -R, but the chmod: changing permissions of ‘70-persistent-net.rules’: Operation not permitted error appears. How to solve this problem?
Thanks for answer!

It is not a good idea to change the rights in /etc/udev
everything there should remains to root account and the message the system provides you an insight about it.

In my case, i try to execute sudo chmod 0777 * -R and it work fine

Related

How to solve permission denied error with react native?

UPDATE:
In terminal I see this file has "-rw-r--r--". What command do I need to run in order to change this to the right permission?
I'm trying to run
react-native run-ios
and I keep getting the error shown below:
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: EACCES: permission denied, open '/Users/sharatakasapu/Desktop/projects/albums/node_modules/.cache/#babel/register/.babel.7.2.2.development.json'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.writeFileSync (fs.js:1299:33)
at save (/Users/sharatakasapu/Desktop/projects/albums/node_modules/#babel/register/lib/cache.js:52:15)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
I tried to follow along at why babel stores .babel.json in USERPROFILE path but didn't understand how to use this to solve the problem I have as I'm new to react. Any advice on how to address this?
About this i have seen this issue quite some time ago!
there can be too cases they might sound pretty lame though but bear with me and read!
1: the user profile you are using has no access to the files that are being targeted! or you might not have access to root node Packages! what you can do is
sudo chmod -R 777 /Users/sharatakasapu/{your node module path}
but the solution one seems a little trivial!
2: allowing your present user to read all cache and property files + folders! by doing
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
for more you can follow these links .
for solution 1: stackLink
for solution 2: githubLink
Had the same problem.
This worked for me:
run
whoami to get the current user.
run: sudo chown -R ownerName: /path/to/node_modules
It looks like you have no permission- try this
sudo chmod -R 777 {path}
You can try having a look at these two examples:
https://github.com/bower/bower/issues/2262
Error: EACCES: permission denied
Also try running your terminal as an Administrator if possible.
If you give permissions, your error must no longer be visible.
Generally on a MAC, the command is:
sudo chown YourName:staff /Users/YourName/.babel.json
anyone can move to project inside just move to ios folder there you can find your node module inside that check the path of every script and navigate them in terminal then try to use this command chmod 755 yourscriptname.sh
Note for my future self. An incompatible drive format might be the error:
"Permission Denied" in Node on Linux, when running start-script /w local nodemon/mocha/babel-node
Give permission to the .babel file

Change the ownership (chown) from 'root' to 'apache'

System OS: CentOS7.0-64 LAMP for VSI
Problem:
I am attempting to change the ownership of two virtual directories from 'root' to 'apache', so that Apache can read and write data. I am using the following commands but to no avail.
chown -R apache:apache /var/www/html/www.example-virtualhost1.com
chown -R apache:apache /var/www/html/www.example-virtualhost2.com
When entering these commands I am receiving an error 'command not found.' Any reference material would be greatly appreciated.
Best.
In order to change the ownership, try the following line:
sudo chown -R apache /var/www/html/
or
sudo chown apache /var/www/html/www.example-virtualhost1.com
The structure is as follows please note the parentheses as an attempt to explain each piece of the command:
sudo(run the command as root) chown(command to change ownership) -R(recursively change everything within the folder) apache(who you want to be the new owner) /var/www/html/(the folder you would like to modify ownership)
Once you have ran this command, you should be able to type in the following command:
ls -lr
That command will show you who has ownership.
I hope this helps!

Path for logs is not writable

When I'm running codecept run on the first try after bootstrap, I'm running into this error,
[Codeception\Exception\Configuration]
Path for logs is not writable. Please, set appropriate access mode for log path.
Thanks!
I had the same problem, but chmod 777 _log resulted in no such file or directory.
Use: chmod 777 -R tests/_log
For me, _log file was already there but I was still getting the same error.
My problem was solved when I used SUDO with my execution command.
I created _log folder inside the folder, "/tests" and gave it a write access,
chmod 777 _log

How to force chmod 777 on readonly usb

This happens often where i cannot write to my flasdrive, then I must format the thing.
I do not know why this happens either, can it be prevented?
How can I force chmod 777 on the drive so I can copy files to it?
any help and advise please?
thanks
well try it as:
chmod -rf 777
or if this doesn't work try:
sudo chmod -rf 777
Edit:
on some Unix distributions it you can do it as:
chmod -f 777
sudo chmod -f 777
If you have a mac, open Finder and go to the file. Then right click and select Get Info. Next, UNCHECK the box that says LOCKED (you may need to click on the padlock and enter your password first). Once that's done, you can chmod at will.

Can't open file 'svn/repo/db/txn-current-lock': Permission denied

I have set up a Linux Server and installed Apache and SVN and dav_svn on it. Now, when I try to upload to https://x.x.x.x:x/svn/repo with Tortoise SVN I get
Can't open file '/server/svn/repo/db/txn-current-lock': Permission denied
I have Set up my SSL correctly (I can checkout, no problems, even remotely due to Port Forwarding).
I'm guessing this has to do with the Linux Ownership of the Repository folders, How must I set this/ what are the commands?
This is a common problem. You're almost certainly running into permissions issues. To solve it, make sure that the apache user has read/write access to your entire repository. To do that, chown -R apache:apache *, chmod -R 664 * for everything under your svn repository.
Also, see here and here if you're still stuck.
Update to answer OP's additional question in comments:
The "664" string is an octal (base 8) representation of the permissions. There are three digits here, representing permissions for the owner, group, and everyone else (sometimes called "world"), respectively, for that file or directory.
Notice that each base 8 digit can be represented with 3 bits (000 for '0' through 111 for '7'). Each bit means something:
first bit: read permissions
second bit: write permissions
third bit: execute permissions
For example, 764 on a file would mean that:
the owner (first digit) has read/write/execute (7) permission
the group (second digit) has read/write (6) permission
everyone else (third digit) has read (4) permission
Hope that clears things up!
It's permission problem. It is not "classic" read/write permissions of apache user, but selinux one.
Apache cannot write to files labeled as httpd_sys_content_t they can be only read by apache.
You have 2 possibilities:
label svn repository files as httpd_sys_content_rw_t:
chcon -R -t httpd_sys_content_rw_t /path/to/your/svn/repo
set selinux boolean httpd_unified --> on
setsebool -P httpd_unified=1
I prefer 2nd possibility. You can play also with other selinux booleans connected with httpd:
getsebool -a | grep httpd
I also had this problem recently, and it was the SELinux which caused it.
I was trying to have the post-commit of subversion to notify Jenkins that the code has change so Jenkins would do a build and deploy to Nexus.
I had to do the following to get it to work.
1) First I checked if SELinux is enabled:
less /selinux/enforce
This will output 1 (for on) or 0 (for off)
2) Temporary disable SELinux:
echo 0 > /selinux/enforce
Now test see if it works now.
3) Enable SELinux:
echo 1 > /selinux/enforce
Change the policy for SELinux.
4) First view the current configuration:
/usr/sbin/getsebool -a | grep httpd
This will give you: httpd_can_network_connect --> off
5) Set this to on and your post-commit will work with SELinux:
/usr/sbin/setsebool -P httpd_can_network_connect on
Now it should be working again.
for example on debian
sudo gpasswd -a svn-admin www-data
sudo chgrp -R www-data svn/
sudo chmod -R g=rwsx svn/
I just had this problem
Having multiple user using the same repo caused the problem
Logout evey other user using the repo
Hope this helps
In addition to the repository permissions, the /tmp directory must also be writeable by all users.
3 Steps you can follow
chmod -R 775 <repo path>
---> change permissions of repository
chown -R apache:apache <repo path>
---> change owner of svn repository
chcon -R -t httpd_sys_content_t <repo path>
----> change SELinux security context of the svn repository
Try to disable SELinux by this command /usr/sbin/setenforce 0. In my case it solved the problem.