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-06-2010, 04:59 PM   #1
Twin Cams
LQ Newbie
 
Registered: Dec 2009
Distribution: Ubuntu, Kubuntu
Posts: 18

Rep: Reputation: 0
Cannot copy to my /opt folder ?


Hello all,

I installed Kubuntu 9.1 and then I downloaded Xampp of Linux to the desktop, however I have to extract it to /Opt/lampp. And that's the problem.

I don't seem to have access or permissions to ??

I tried right-click | properties | permissions but the fields are greyed-out to make any changes.

I am logged-in using the same user id/password I created when installing K9.1.

Any suggestions, please explain in layman terms so that I follow your flow. Thanks!!
 
Old 04-06-2010, 05:02 PM   #2
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 572

Rep: Reputation: 120Reputation: 120
run the command "ls -la /opt" and post the output here. Also, post the username you are logged in as and the results of the command "groups <your username here>".

Thanks
 
Old 04-06-2010, 06:33 PM   #3
Twin Cams
LQ Newbie
 
Registered: Dec 2009
Distribution: Ubuntu, Kubuntu
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by devnull10 View Post
run the command "ls -la /opt" and post the output here. Also, post the username you are logged in as and the results of the command "groups <your username here>".

Thanks
This is the output:

total 8
drwxr-xr-x 2 root root 4096 2010-04-05 23:16 .
drwxr-xr-x 21 root root 4096 2010-04-05 22:48 ..


I don't understand the last part about the groups ???
 
Old 04-06-2010, 09:09 PM   #4
nonamenobody
Member
 
Registered: Oct 2002
Posts: 138

Rep: Reputation: 22
Quote:
Originally Posted by Twin Cams View Post
I installed Kubuntu 9.1
Just to be pick it is 9.10 (nine point ten), as it was released in the then tenth month of 2009 (that is the naming scheme for (K)Ubuntu)
Quote:
and then I downloaded Xampp of Linux to the desktop, however I have to extract it to /Opt/lampp. And that's the problem.
'/Opt' would certainly be a problem in a case sensitive operating system like Linux.

Quote:
I don't seem to have access or permissions to ??

I tried right-click | properties | permissions but the fields are greyed-out to make any changes.

I am logged-in using the same user id/password I created when installing K9.1.
Permission to alter/create files in '/opt', no you won't have. Ubuntu doesn't give you direct access to a user account with many privileges (there is only really one privileged user in a Linux/UNIX system and that is root). Root logins are disabled in Ubuntu by default. However they do give you method to temporarily elevate your privilege (at last for the first user you create, you have to allow it for other users) - it is called sudo and it is not very different from Windows' run as and UAC, though if you are running GUI apps you will want to run kdesudo or gksudo (e.g. press ALT+F2 and enter 'kdesudo konqueror'). In KDE there may even be a 'Run as Root' option or 'File Manager as Root' in the menus), I don't recall, it has been a while.
 
Old 04-06-2010, 09:10 PM   #5
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,006

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
So your output of the ls shows that only root user has the rights to create (the 'w' part is write ie create folder/files)
folders and files in /opt, so unless you are root or change the permissions you cannot.

Secondly, the username part i am sure you understand (ie mine is grail), so if at the command prompt
you type(> is the prompt):

Code:
>groups 

or

>groups grail
This will display which group(s) you are a member of.
 
Old 04-07-2010, 03:48 AM   #6
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 572

Rep: Reputation: 120Reputation: 120
Well, for /opt, you need to be root which I would imagine you aren't.
My suggestion would be to use groups. The other (far less preferred) options are to change ownership or make the permissions 777.
The output from "groups user" will show you what groups you are already a member of. You might want to create another, say "system" and add yourself to that group, then chgrp /opt to that group, setting the sticky flag. This must all be done as root.
 
Old 04-07-2010, 06:00 PM   #7
Twin Cams
LQ Newbie
 
Registered: Dec 2009
Distribution: Ubuntu, Kubuntu
Posts: 18

Original Poster
Rep: Reputation: 0
Ok, think I got it, the output for groups: adm dialout cdrom plugdev lpadmin admin sambashare

The CD I installed from is: Ubuntu Family 9.1 Karmic Kola

Last edited by Twin Cams; 04-07-2010 at 06:42 PM.
 
Old 04-07-2010, 07:21 PM   #8
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,006

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
So as devnull suggested, maybe change the group to admin (which you are a part of) and alter permissions to maybe 775 and then you should be right.
Obviously you should weight this against which other users you have in this group and if they should all require this access as well.
 
Old 04-07-2010, 07:48 PM   #9
Twin Cams
LQ Newbie
 
Registered: Dec 2009
Distribution: Ubuntu, Kubuntu
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by grail View Post
So as devnull suggested, maybe change the group to admin (which you are a part of) and alter permissions to maybe 775 and then you should be right.
Obviously you should weight this against which other users you have in this group and if they should all require this access as well.
Thanks again...

Can you list out the steps of how I would go about accomplishing this???

No one else would be using this computer so that's not a problem.

Much thanks.
 
Old 04-08-2010, 01:21 AM   #10
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 572

Rep: Reputation: 120Reputation: 120
chgrp admin /opt
chmod 775 /opt (or chmod 2775 if you want the sgid flag set).

Last edited by devnull10; 04-08-2010 at 01:25 AM.
 
Old 04-08-2010, 08:18 AM   #11
Twin Cams
LQ Newbie
 
Registered: Dec 2009
Distribution: Ubuntu, Kubuntu
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by devnull10 View Post
chgrp admin /opt
chmod 775 /opt (or chmod 2775 if you want the sgid flag set).
Ok, will give this a go when I get home.

And what does: sqid flag set means....so that I understand what that option is. Thanks.
 
Old 04-08-2010, 09:12 AM   #12
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
hi the reply is just what nonamenobody has said.... you got to use sudo you would not need to change any permissions i think.
for eg if you are running from the command line

sudo "command".
 
Old 04-08-2010, 11:10 AM   #13
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 572

Rep: Reputation: 120Reputation: 120
Damn - didn't notice he was running a belts and braces version of Linux!
 
Old 04-08-2010, 02:19 PM   #14
Twin Cams
LQ Newbie
 
Registered: Dec 2009
Distribution: Ubuntu, Kubuntu
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bsat View Post
hi the reply is just what nonamenobody has said.... you got to use sudo you would not need to change any permissions i think.
for eg if you are running from the command line

sudo "command".
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.
 
Old 04-08-2010, 11:30 PM   #15
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,006

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Basically whatever the 'command' is you would execute normally and then just place sudo in front.

Code:
as user: chmod 775 /opt

Above receives error that you are not allowed

using sudo: sudo chmod 775 /opt

On enter you will be asked for your password
 
  


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 05:07 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