permission denied
Hello,
I'm trying to move the tomcat docs tar I downloaded but keep getting the following error: mv apache-tomcat-7.0.32-fulldocs.tar.gz /software mv: cannot create regular file '/software/apache-tomcat-7.0.32-fulldocs.tar.gz' : permission denied. What can I do? Thanks in advance, Mike |
Well, as it says, you don't have permission.
You need to check the ownerships and perms of that dir and compare to your current user. |
Hi, when you do this,
Quote:
You might try to put it in the /home/$USER/software by leaving out the / (relative addressing, from where you are, like /home/$USER/) type this, Code:
mv apache-tomcat-7.0.32-fulldocs.tar.gz software Regards, Glenn |
This command will tell you the permissions of the tarball:
Code:
ls -l apache-tomcat-7.0.32-fulldocs.tar.gz Code:
ls -l /software This will give you a good introduction to permissions: http://www.slackbook.org/html/book.h...RE-PERMISSIONS |
First of all make sure that /software directory exists. If it exists, then check permission and ownnership of both tar file as well as /software dir. as follow:
Quote:
If any one of them is owned by root or any other user or if do not have "write" permission for group and others, then it will not permit you to do so. So switch to "root" user and invoke the mv command, and also use absolute paths, not relative paths. It will sure work. Code:
# mv ./apache-tomcat-7.0.32-fulldocs.tar.gz /software/ |
I logged in as root and the mv command worked. The output from the ls -l command for the /software is
drwx------ 2 root root 16384 Oct 16 16:58 lost+found/ and for the file I was tring to move is -rw-r--r-- 1 mike mike 4906088 Oct 17 12:15 apache-tomcat-7.0.32-fulldocs.tar.gz Is the problem with the /software since it doesn't have world write permission? /software is the mount point for /dev/sda5 and I used the mount /dev/sda5 /software command to mount it since it's not in the /etc/fstab I'm searching online to find out how to modify the /etc/fstab file but if the problem with the /software, can I modify the permissions with the mount command? Thank you, Mike |
If I understand the problem you're having correctly, have you tried
Code:
sudo chmod 664 (filename) |
Quote:
Code:
# ls -ld /software/ Code:
# getfacl /software/ Code:
# su Whatif Code:
# setfacl -R -m u:Whatif:rwx /software/ |
Quote:
Well, there are following ways now: First way# Add write permissions for /software directory for group and other, so you will be able to move anything from/to it, as follow: # su - root Enter root password: (I assume that you know the root password, else use command # sudo su - root) # chmod 777 /software Second way# You can change ownership and group of the directory, so it will then allow you, as follow (again do it as root only): # chown mike:mike /software # ls -ld /software drwxrwxrwx 2 root root 16384 Oct 16 16:58 /software (Output would be something like this, though you've mentioned wrong output of lost+fond file instead of /software in your last comment. So take a note that always use ls -ld not just ls -l, as ls -l will give you content inside the dir.) Third way# Instead of changing permissions or ownership, just change group of the /software dir. and add yourself in that group and then add "write" permission for group on it, as follow: # chgrp mike /software (Or you can specify any other group in place of mike) # chmod 770 /software |
All times are GMT -5. The time now is 12:52 AM. |