0
1
I am executing the following command from my Linux machine.
cp -r hwweb-ws-5.0 /home/tomcat/hwweb-1/webapps/
It's displaying the following error:
cp: cannot create directory `/home/tomcat/hwweb-1/webapps/hwweb-ws-5.0': Permission denied
0
1
I am executing the following command from my Linux machine.
cp -r hwweb-ws-5.0 /home/tomcat/hwweb-1/webapps/
It's displaying the following error:
cp: cannot create directory `/home/tomcat/hwweb-1/webapps/hwweb-ws-5.0': Permission denied
1
Try
sudo cp -r hwweb-ws-5.0 /home/tomcat/hwweb-1/webapps/
and then type your super user password.
The other way is to change the owner or add your user to the owner group of the /home/tomcat/hwweb-1/webapps/
directory. Obviously, your user doens't have right to write in this directory now.
I am not a admin user , how can i add user to the owner group of the /home/tomcat/hwweb-1/webapps/ directory – None – 2011-10-27T11:12:01.407
As far as I know, you have to be admin user to change permissions on directories. The other way is to execute the copy operation via tomcat user (because the copying is made in the tomcat's home directory). I think this link might be useful to you.
3Have you checked permissions! – Didier Trosset – 2011-10-27T11:00:01.833
Most probably you'll need to check who's the owner of the folder by using "
ls -l /home/tomcat/hwweb-1/webapps
" and then switch to that user by using e.g. "su webapps
". After that try copying the folder again and don't forget to switch back to your user by hitting "exit
" in the command line. – None – 2011-10-27T11:06:14.097