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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
"sudo" is basically to run a command as if you were the root . you can read it as "SuperUserDo".
So whenever you come across the problems like permission denied during any operation, just prefix "sudo" behind the command so that you get the rights to do everything you want.
Ok, so you changed the permissions on the directory, but did you change the group?
Originally you had the following for ls -ls /opt:
Quote:
drwxr-xr-x 2 root root 4096 2010-04-05 23:16 .
And with the above chmod you should now have (I would advise to check this is so):
Quote:
drwxrwxr-x 2 root root 4096 2010-04-05 23:16 .
But all this has done is allow the group 'root' to now also have write access to this directory.
As you are not in this group then you do not have access unless again using the sudo command.
However, if you were to issue:
Code:
chgrp admin /opt
This will then allow all users in the admin group to write to this directory.
(Chose admin as you previously indicated you are in this group)
The basic thing is for a user except root don't have write permissions to folders except your home (~/) folder. If you want write to other folders, use
sudo "commandName"
Changing permissions in the /opt is highly NOT recommended.
Further, you can change to root user by typing following in the terminal.
Quote:
sudo su
Then, you have write access to all the folders under /.
For your problem, use,
Quote:
sudo tar -xf xampp-linux-1.7.3a.tar.gz -C /opt
You forget the option -xf. -x option says to eXtract the given file.
Well. Still no go. This is the error messages now:
supra@supra-desktop:~$ ls
- Desktop Documents Downloads groups is ls Music Pictures Public Templates Videos
supra@supra-desktop:~$ sudo tar -xf xampp-linux-1.7.3a.tar.gz -C /opt
tar: xampp-linux-1.7.3a.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
Well, the 'Desktop Folder' shows the following folder:
- xampp-linux-1.7.3a.tar
- lampp (folder)
Also, looking at File Manager (Dolphin) it shows the same files in Documents (folder) and Desktop
supra@supra-desktop:~$ ls
- Desktop Documents Downloads groups is ls Music Pictures Public Templates Videos
supra@supra-desktop:~$ ls documents
ls: cannot access documents: No such file or directory
supra@supra-desktop:~$ ls /documents
ls: cannot access /documents: No such file or directory
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.