LinuxQuestions.org
Help answer threads with 0 replies.
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 10-04-2007, 01:21 PM   #1
Dakota42784
Member
 
Registered: Oct 2007
Location: Kentucky, USA
Distribution: Ubuntu 904 I386
Posts: 54

Rep: Reputation: 15
Unhappy Permissions How do I gain full Permission


How do I gain Full Permission to do things. I realize that you can really screw up a System like this but I Will be Extremely careful.
(1) when I try to do a simple Drag & Drop of a Gotmail.wav to
/usr/share/sounds............It says Access Denied. !!!!
I want to be able to do this & other commands all the time.

Please explain in detail............I do have my system Backed up!!!!
Please E-Mail me & answer here
 
Old 10-04-2007, 01:38 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
First--welcome to LQ
Second--We don't need the big font to get your point.
Third--questions are answered on the forum, not normally by e-mail.

You have many options--including:
Change the permissions on specific folders or add the relevant groups to the desired users

Open a terminal and enter "su" to take on root powers---or just "sudo" for individual commands.

Summon all of your self-destructive tendencies and log into the GUI as root. This usually needs to be enabled in a control panel--eg "login manager" or something similar.
 
Old 10-04-2007, 03:20 PM   #3
kyo
LQ Newbie
 
Registered: Jul 2007
Posts: 6

Rep: Reputation: 0
Restricting regular users to the home directory not only protects the system from the users but also protects the system from malicious code. So operating as a regular user is really a good idea. Like Pixellany said, you can operate as a superuser and do anything by using the su command. But you should only do that when you really need to, not all the time.

Last edited by kyo; 10-04-2007 at 03:22 PM.
 
Old 10-04-2007, 03:36 PM   #4
nkd
Member
 
Registered: Oct 2006
Location: india
Distribution: fedora 8, ubuntu 10.10
Posts: 318

Rep: Reputation: 34
hi Dakota..
There are plenty of material on the net about file permissions..Plz read some.
Also remember ls -l command will give you the owner of the dir and the group of the owner. It lists out explicitly the read, write and execute permissions for user, group and everyone to that dir.
So if in your case you are say user u1 and belong to group g1, then if the dir /usr/share/sounds is owned i.e created by u1 there will be no problem in doing what you intend to do.
IF however, let's say user u2 created it and he is not part of your group g1 then if the dir has everyone section as r-x or r-- i.e if it has the w bit turned off then that is a problem.
You can become part of his group to resolve it or he may set the everyone section of dir to rwx
plz send output of ls -l command to help you better. also send the user and group details.
hope this helps
nishith
 
Old 10-05-2007, 11:12 AM   #5
Dakota42784
Member
 
Registered: Oct 2007
Location: Kentucky, USA
Distribution: Ubuntu 904 I386
Posts: 54

Original Poster
Rep: Reputation: 15
Still Confused:

First, I am the only user.......no others
Second, I know how to open Terminal, but not what commands to type in.!!!!!
Third, Can you type in here the commands so that I can copy & paste & even when I close Terminal window & or Re-boot that I will still have root & administrative control.

If I can't have control it will be no fun for me.
 
Old 10-05-2007, 12:30 PM   #6
MoonMind
Member
 
Registered: May 2005
Location: Switzerland
Distribution: Ubuntu
Posts: 448

Rep: Reputation: 38
Dakota42784:

Linux is - by definition - a multiuser system, so there is the possibility to have different users configured. For everyday work, it's useful to have a personal user to use the system.

You *can* have control all the time by working as "root" (the system's superuser), but it's not wise or sensible to do that all the time! If you need to change or configure something on the system, then be root (using the command su) or use the command sudo in front of all commands you issue on the command line.

Again: It's really, really a bad idea to be root at all times since if your system is (for one reason or another) unsafe, you'll lose it to all intruders immediately. If you're online a lot, don't be root!

Lists and introductions for commands here:
M.
 
Old 10-05-2007, 01:07 PM   #7
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 67
"distrowatch" no not a distro - please set your disto in your profile to the name of he distribution you use. Common/popular distros include Fedora, Ubuntu, SuSE, Mandriva, and many others. If you provide this information people will be able to help you more easily, giving more precise information.

It is also helpful to know which desktop environment you use. The two most common ones are Gnome and and KDE. Please tell us which one you use. Typical Gnome configurations have you starting programs from an "Applications" menu (with a text label), where as KDE typically has a "K" button which is used to start applications.

What you can do is set up a launcher (an icon on your panel) which will open a file manager program with root access. This way, you can use the normal file manager most of the time, but you can use this if you really need to. When you launch it you will be prompted for your root password.

If you tell us which distro and desktop environment you use, we can tell you how to set this up. Some distros may even have an option like this in the application menus already.
 
Old 10-05-2007, 02:41 PM   #8
Dakota42784
Member
 
Registered: Oct 2007
Location: Kentucky, USA
Distribution: Ubuntu 904 I386
Posts: 54

Original Poster
Rep: Reputation: 15
Permissions How do I gain full Permission

Please see my new Profile, More Info.
Thank You
 
Old 10-05-2007, 03:03 PM   #9
Dakota42784
Member
 
Registered: Oct 2007
Location: Kentucky, USA
Distribution: Ubuntu 904 I386
Posts: 54

Original Poster
Rep: Reputation: 15
Permissions How do I gain full Permission

I have Kubuntu 7.04 Feisty Fawn.
Kde Desktop.
OK, I understand that being in control of Root always can be vulnerable.
Tell me what commands to type in Terminal to allow me to do whatever,and then,
what commands [B][/to type in to give control back to the Operating System.]

Thanks
 
Old 10-05-2007, 03:58 PM   #10
MoonMind
Member
 
Registered: May 2005
Location: Switzerland
Distribution: Ubuntu
Posts: 448

Rep: Reputation: 38
With (K)Ubuntu, this is actually very easy: if you type in sudo before the command you want to use, the command is executed as if you were root, but you're still in your state of normal user - or to put it in another way: after the command is executed, you don't stay root. *buntu handles this very gracefully - while some argue that this is not the most secure way, it's certainly thoughtful. In fact, they even disable the root account (it's easy to set up, but you needn't). sudo is your way to full control only (and really only) when you need it, and it's already there.

M.

Last edited by MoonMind; 10-05-2007 at 03:59 PM.
 
Old 10-05-2007, 04:02 PM   #11
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 67
OK first choose what graphical file manager you want to use. I would recommend using Thunar rather than konqueror, as konqueror starts a lot of background processes which are a security risk, and chew up system resources (a bunch of KDE daemons). Thunar also has a natty little warning telling you that the window you are using is running as root and that you may damage your system. This is more than just a security warning... if you create files in your home directory as root, only root will be able to modify them, so you should not use root to modify your personal files. Use adept or synaptic to install Thunar first.

To test it out, press Alt-F2 to bring up a run dialog and enter this:
Code:
kdesu Thunar
You will be prompted for your sudo password and then you will get a Thunar instance running as root. If that works to your satisfaction, you can create a menu item using that command and then drag it to the panel or desktop as you see fit.

The terminal way to copy files:
  • Open a konqueror terminal emulator.
  • To copy the file example.txt to the name example2.txt, you would use the command:
    Code:
    cp example.txt example2.txt
  • You can copy multiple files to a directory and a lot more. Use the command "man cp" for the documentation on the command.
  • Any shell command you can run as your nornal user can be run as root using:
    Code:
    sudo command
    For example:
    Code:
    sudo cp example.txt example3.txt
    Note that the resulting file will be owned by root, meaning your normal user will not be able to edit it.

I would recommend you find and carefully read an introduction to file permissions on unix-like systems. It's not so complicated, and will sav you a lot of frustration if you understand it now. Terms and concepts you should understand:
  • File owner and group identifier
  • Permission categories: user, group, other
  • Permission types: read, write, execute - especially the differences in meanings for files and directories
  • Advanced stuff includes the sticky bit, suid, octal permissions
  • ACLs (not usually implemented on Desktop-targeted distros)

Helpful manual pages to browse: chmod, chown, chgrp.
 
Old 10-05-2007, 04:03 PM   #12
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 67
A clarification: sudo lets you run a command with root permissions from within a terminal window. kdesu lets you run commands a little like with sudo, but displays a graphical dialog box to get your password.
 
Old 10-05-2007, 04:09 PM   #13
Dakota42784
Member
 
Registered: Oct 2007
Location: Kentucky, USA
Distribution: Ubuntu 904 I386
Posts: 54

Original Poster
Rep: Reputation: 15
Permissions How do I gain full Permission

Yes, But [B][What do I do after I type in SUDO? And, Do I Leave terminal window oppen & then do my task. And, when I complete my task..........and close terminal window doe's control revert back to the Operating System???????/B] Right now all I want to do is drop a gotmail.wav.........into /usr/share/sounds.

Basically, I am just trying to be notified that I have mail without opening up my mail program KDE (KONTACT).

Thanks
 
Old 10-05-2007, 06:15 PM   #14
MoonMind
Member
 
Registered: May 2005
Location: Switzerland
Distribution: Ubuntu
Posts: 448

Rep: Reputation: 38
Hm... I'm not sure if you understand how LinuxQuestions (or any support community, for that matter) works. Learning's something you must do yourself! You've been given lots of useful information, yet you're still not willing to take things into your own hands. I don't think it's sensible to expect hands-holding all the way through! That won't take you anywhere. Furthermore, you're just repeating a tiny request while you have been given much more thorough advice - I'm sorry to say this, but this almost appears rude! Please be patient with the issue at hand as well as with yourself, but get going!

You wanted to know about sudo - it's already explained (twice, and from different perspectives), and furthermore there has been more information added about kdesu, a tool that's there waiting for you to use it. It's a great piece of help matthewg42 gave you there, please make use of it! And as for all the others, they only tried to make you move - you have to if you want to achieve something.

As for your request: The cp command has been explained (shortly, but correctly), the details on it and a whole lot other commands are a (clickable) link and some minutes of careful reading away. Combined with sudo, it solves your problem - well, almost; you'll have to find out things about chmod, too. Please, don't expect us to solve such tiny problems for you entirely - people around here love to help, but you'll have to do things yourself if you want to be really able to handle your system on the long run. What people are trying here is help you really learn that stuff!

btw: There are lots of interesting tools to get mail notification... But we're not there yet.

M.
 
Old 10-05-2007, 06:32 PM   #15
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 67
In the example I gave where you would run "kdesu Thunar", it is a graphical program... you would select the file gotmail.wav from wherever you saved it, and copy it, then navigate to /usr/share/sounds and paste it. Or open to windows and drag and drop like you would with file managers on other OSes. If you use this method, there is no need to use a terminal command at all.

If you choose to accomplish the task with commands in the terminal, you would do it with the command:
Code:
sudo cp gotmail.wav /usr/share/sounds
This assumes you have saved the gotmail.wav file into your home directory. Note that the shell (the program which runs "inside" the terminal program and reads input from you and executes commands) has a "working directory" - some state which says where the shell is looking for files which are not specified with their full path. The default working directory is your home directory. You can ask the shell to print the current working directory by using the "pwd" command (print working directory), and can change it with the "cd" command (change directory).

One advantage of using commands in the terminal is that it is very easy for people in forums like this to give you commands to execute in a terminal. This is unambigious and the recipient of the instruction can simply copy-paste the advice to reduce the chance of an error. Other advantages include being able to store a complex or long series of commands in a "script" and run them multiple times with ease. It is also easier to control machines with a terminal over slow network connections than by using something like a remote desktop tool.

An interactive shell's basic work flow is to read commands which are typed in, execute them and when they are finished print a new "prompt" informing the user that they are ready for a new command. Running a process from an interactive shell does not block other processes on the system (Linux is multi-tasking). There are some advanced methods which allow you to run more than one process from a single terminal, but I don't think you are ready to try that yet.

The shell looks are each command, using the first part as the command name, and subsequent parts as arguments to the command. The shell does a few things - first it does alias substitutions (expanding special abbreviations to full commands), then it looks to see if the command name is an internally implemented function, and if so execute it (by internally implemented I mean implemented with the shell program).

If the command name does not refer to an internally implemented function the shell will look though a list of directories called the PATH for files which have the same name as the command name and are executable. If one if found, a new process is started for that executable file, and the argument list is passed to it.

When the command is complete, the shell prints a message to tell the user that it is ready for another command.

OK, I'm not going to explain all of shell usage - if you are further interested in this subject I would recommend reading one of the very many tutorials and guides on the subject. Suffice to say the shell is a very useful tool, but you can usually accomplish similar tasks using graphic tools if you prefer.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
full permission for particular samba user ssilayaraja Linux - Software 1 10-06-2006 02:18 AM
full access permissions he_the_great Linux - Newbie 2 09-23-2006 12:30 PM
Creating VSFTPD Full permission User to /var/www/html vibin Linux - General 5 01-03-2006 03:32 AM
Full dialup and DNS ok as root, user can only ping the ISP, permission? Emmanuel_uk Linux - Newbie 7 04-27-2005 02:37 PM
How do I change permissions for a full Stevetgn Linux - Newbie 3 05-15-2004 03:15 PM

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

All times are GMT -5. The time now is 10:12 AM.

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