Whenever I open the terminal on my Centos5.1, I always get this error
/root/.cshrc Permission denied
and then I can't use networking commands (ip,ifconfig,...) because they are reported as unknown commands.
Verify that you have permissions to read .cshrc To do that issue:
ls -l /root/.cshrc
If the output begins with to dashes it means that you don't. To give yourself read permission to this file issue:
chmod +r /root/.cshrc
Now if you run ls -l /root/.cshrc the output should start with -r.
Related
when I was try to use touch command on my ubuntu bash shell and in my Desktop folder /mnt/c/Users/Public/Desktop$ it give me this touch: cannot touch 'test.txt': Permission denied error.
You may not have access to the /mnt/c/Users/Public/Desktop directory as default
Run:
ls -ld /c/mnt/Users/Public/Desktop
to see whether you have write permissions as default. If you don't run:
sudo chmod +w /mnt/c/Users/Public/Desktop
This will then allow you write permissions to the directory and allow you to create files.
NOTE - Please ensure that the initial bash executable is run as administrator at Windows level
I pasted tomcat folder in Linux machine. User is root . When I go to bin folder and execute ./startup.sh I'm getting an error:permission denied. [This is what I got]
How to rectify this issue.
give:
chmod -R 777 startup.sh
Then error will come as:Cannot find ./catalina.sh
then give:
chmod -R 777 catalina.sh
Tomcat will start.
the problem was because there was no permission for executing. u can see if permission is there or not by giving:
ls -l
As color of file name is white, I suppose file is not executable; try the following command
ls -l
It gives you file list with its permission. Try using command
chmod a+x startup.sh
If still permission denied. Try
sudo chmod a+x startup.sh
Then try using
./startup.sh
If still permission denied. Then try
sudo ./startup.sh
Hope it will be helpful.
Verify, that your filesystem with the new tomcat folder isn't mounted with "noexec". Please run a "ls -l", "file start.sh" and a "head start.sh" .
Tom
It is also worthwhile to check which bash you are using with
which bash
This is because you might see the error
Cannot find ./catalina.sh
when your bash is /usr/bin/bash but is working perfectly fine when bash is /usr/bash
I installed barnyard2 for snort, but when i run command below this error appear.
[root#localhost snort]# barnyard2 -c /etc/snort/barnyard2.conf -d /var/log/snort/ -f snort.log -w /etc/snort/bylog.waldo /etc/snort/gen-msg.map /etc/snort/sid-msg.map -C /etc/snort/classification.config
Running in Continuous mode
--== Initializing Barnyard2 ==--
Initializing Input Plugins!
Initializing Output Plugins!
Parsing config file "/etc/snort/barnyard2.conf"
+[ Signature Suppress list ]+
----------------------------
+[No entry in Signature Suppress List]+
----------------------------
+[ Signature Suppress list ]+
Barnyard2 spooler: Event cache size set to [2048]
ERROR: Can not get write access to logging directory "/var/log/barnyard2". (directory doesn't exist or permissions are set incorrectly or it is not a directory at all)
Fatal Error, Quitting..
Barnyard2 exiting
and permission is:
[root#localhost snort]# ls -l /var/log/barnyard2
-rwxrwxrwx. 1 root root 0 Aug 14 16:35 /var/log/barnyard2
in this link this problem was solved but i don't understand how ...
https://forums.freebsd.org/threads/barnyard2-start-service-error.51378/
It looks like directory flag is missing there. The error message says
ERROR: Can not get write access to logging directory "/var/log/barnyard2". (directory doesn't exist or permissions are set incorrectly or it is not a directory at all)
Probably the last case of /var/log/barnyard2 being not a directory at all might apply.
Backup the file and try creating a directory /var/log/barnyard2 with permissions 640 and corresponding ownership.
EDIT: As long as you do not know the contents of /var/log/barnyard2, rename or move the file to some place ( as root 'mv /var/log/barnyard2 /var/log/barnyard2.old'). Restarting barnyard2 now could help, it might create the directory with appropriate permissions by itself. Otherwise as root type 'mkdir /var/log/barnyard2' and then set permissions by typing 'chmod 640 /var/log/barnyard2'. Additionally check the user under which barnyard2 is running by typing 'ps -u | grep "barnyard2"'. Then find the appropriate group to that user by typing 'groups <user>' and then set the ownership of the directory to the corresponding user by typing 'chown <user>:<group> /var/log/barnyard2'.
'/var/log/barnyard2' should be the log directory. In your case it is a file. So, delete the file and create a directory instead. Here are the steps. Enter the commands as a root user.
rm /var/log/barnyard2
mkdir /var/log/barnyard2
Can anyone help me in fixing the permission issues in Linux.
I am new to Linux and i am trying to run a script called buildAll.sh
by moving to that specific directory and i typed ./buildAll.sh the response i got was
./buildAll.sh: 16: ./buildAll.sh: ./buildJS.sh: Permission denied
i tried to run using sudo ./buildAll.sh , but that didn't work.
Then i tried with chmod -r 777 buildAll.sh and again i tried to run that script but no change.
I have a folder called build which has some dependency can be seen a folder with locked picture.
Can anyone help me to run the script without having the permission issues please
in line 16 your script seems to call buildJS.sh and the permissions OF THAT seem to be incorrect
You obviously have a pervasive permissions problem. Why don't you just start again, unpack the files into a new directory without using sudo or su, and then use chmod +x on the files that need to be executable?
sudo chmod +x buildAll.sh
Should do the trick
It seems by the error message the issue is with buildJS.sh. If buildJS.sh is not in your current directory (it might not be as buildAll.sh might be changing directories), find buildJS.sh and then:
chmod +x ${directory_where_found}/buildJS.sh
Since .sh files should have executable permissions by default you can do this:
cd $YOUR_DIRECTORY
find . -name '*.sh' -exec chmod +x {} \;
I tried with sudo chmod +x buildAll.sh
rm: cannot remove ‘build’: Permission denied
cp: cannot stat ‘./build/.svn’: Permission denied
cp: cannot stat ‘./build/compiler.jar’: Permission denied
cp: cannot stat ‘./build/buildJS.sh’: Permission denied
touch: setting times of ‘build’: Permission denied
./buildAll.sh: line 14: cd: build: Permission denied
./buildAll.sh: line 16: ./buildJS.sh: No such file or directory
You have given permission only to run your script. However, this doesn't mean that you have permission for all of instructions launched by the script. The error message is there to prove it ;) .
After extracting and saving the ant files into an opt/ directory and setting the path variable
to $ANT_HOME/bin
I ran the following command on a CentOS 5
ant -version
and I am getting the following error
-bash:/path/opt/apache-ant-1.8.2/bin/ant: Permission denied
Is there some permission I am supposed to set or some typical source of this problem?
Thanks!
If you own the file, try
chmod u+x /path/opt/apache-ant-1.8.2/bin/ant
If someone else owns it, either sudo or become root then
chmod 755 /path/opt/apache-ant-1.8.2/bin/ant
You need to have execute permissions on the file; the first gives execute permissions to the owner only and is probably preferable if you own the file and are the only one that uses it. The second requires root privileges and gives execute and read permission to everyone, plus write permission to the owner.
You can view the current permissions and ownership of the file by running ls -l /path/opt/apache-ant-1.8.2/bin/ant.