LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 04-09-2010, 01:14 AM   #16
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72

"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.
 
Old 04-09-2010, 01:26 AM   #17
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 572

Rep: Reputation: 120Reputation: 120
Quote:
Originally Posted by Twin Cams View Post
O-k-a-y. I'm trying to follow along here, so please bear with me...

So if I use sudo 'command' what is the actual command do I use to give permissions to that /opt folder?

I'm trying to understand this, but haven't had the, Ah-ha! moment yet.
I posted the commands above.
 
Old 04-11-2010, 08:59 PM   #18
Twin Cams
LQ Newbie
 
Registered: Dec 2009
Distribution: Ubuntu, Kubuntu
Posts: 18

Original Poster
Rep: Reputation: 0
Ok, so I performed the command successfully and entered my password:

sudo chmod 775 /opt

But still I cannot copy (tried drag-n-drop) that extracted lampp folder to /opt !??! Ah mean, why is this sooooo difficult to do after using sudo?

How can I move or copy this lampp folder over to /opt via cli?
 
Old 04-11-2010, 09:10 PM   #19
Twin Cams
LQ Newbie
 
Registered: Dec 2009
Distribution: Ubuntu, Kubuntu
Posts: 18

Original Poster
Rep: Reputation: 0
I even tried this command I found online to no avail: sudo tar xampp-linux-1.7.3a.tar.gz -C /opt

I'm at such an impasse.
 
Old 04-11-2010, 09:25 PM   #20
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192
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)
 
Old 04-12-2010, 01:00 AM   #21
kasunbg
LQ Newbie
 
Registered: Mar 2009
Location: Sri Lanka
Distribution: Ubuntu 9.10
Posts: 13

Rep: Reputation: 0
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.

HTH
 
Old 04-12-2010, 06:05 AM   #22
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 572

Rep: Reputation: 120Reputation: 120
Post the output which you did originally so we can now see the results.
 
Old 04-17-2010, 12:26 PM   #23
Twin Cams
LQ Newbie
 
Registered: Dec 2009
Distribution: Ubuntu, Kubuntu
Posts: 18

Original Poster
Rep: Reputation: 0
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
 
Old 04-17-2010, 12:37 PM   #24
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
tar: xampp-linux-1.7.3a.tar.gz: Cannot open: No such file or directory
The file is not at the location you think it is.
Quote:
supra@supra-desktop:~$ ls
- Desktop Documents Downloads groups is ls Music Pictures Public Templates Videos
Where did you downloaded the file?
Desktop, Downloads....
First cd to the directory containing the tar archive.
 
Old 04-18-2010, 02:16 PM   #25
Twin Cams
LQ Newbie
 
Registered: Dec 2009
Distribution: Ubuntu, Kubuntu
Posts: 18

Original Poster
Rep: Reputation: 0
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

Last edited by Twin Cams; 04-18-2010 at 02:19 PM.
 
Old 04-18-2010, 02:21 PM   #26
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Documents begins with a capital 'D'. Case sensitivity is important.
 
Old 04-18-2010, 02:34 PM   #27
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Do
Code:
cd Desktop
ls
tar -xvf xampp-linux-1.7.3a.tar
cd to the directory created by th tar command
read the readme files
 
Old 04-18-2010, 02:51 PM   #28
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 37
I think there is no need to change the permissions of /opt. What you all have to do is to run the xampp related executable file from command prompt as

Code:
$cd /path/to/executableFileofXampp
$sudo ./executableFileofXampp
If running from GUI, then:

Code:
$gksudo nautilus
then run the executable file from GUI mode..


Please correct me if wrong.

Last edited by saagar; 04-18-2010 at 02:56 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
restore opt folder jbumgarjr Linux - Newbie 1 03-31-2010 04:24 PM
i need to copy files from one folder to another folder using shell anurupr Linux - Newbie 17 03-04-2010 09:07 AM
want to copy an inode folder from acdrom to a home directory (folder). nhbob Linux - Newbie 8 12-20-2009 11:12 AM
Regarding # /opt/CTEact/bin/act & /opt/SUNWexplo/bin/explorer not available for x86 rajaniyer123 Solaris / OpenSolaris 6 04-24-2008 09:09 AM
creating folders under opt/lampp/htdocs folder in fedora sent222 Linux - Newbie 3 01-03-2008 04:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration