Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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:
ls -l apache-tomcat-7.0.32-fulldocs.tar.gz
ls -ld /software
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.
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?
Mike, there's nothing tricky in your problem. It was simply because you were trying to move something in a directory which was write protected.
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