LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Permission for Everything (https://www.linuxquestions.org/questions/linux-general-1/permission-for-everything-558638/)

kshane 06-02-2007 12:18 PM

Permission for Everything
 
How do I give myself permission for everything? I'm the sole user...

Thanks...
Kevin

Brian1 06-02-2007 01:07 PM

If you want permission to everything then you should log in as root. I assuming you want to be able to use any command to do any job?

If you what to be able to run some commands as root when needed then you can do it several ways. edit /etc/sudoers file with the visudo command and looking at the examples give yourself the ability to do everything. For that to work place the command sudo before the command you wish to run and then it is run as root. You can set it up to use your password or just run the command without. I would at least add the support to enter your user password just to run the command.

This is not the best way to run a system. One miss type letter or command option can wipe a system faster than you can press the return key. Granted this is not an issue since there are few linux variant virus in the wild but if you were to be browsing the web with java scripting and get hit by something then it has root priviledges to do as it like. Just my thoughts.

Brian

pixellany 06-02-2007 01:13 PM

Ditto the "you don't wan't to do that" sentiment. When you need to do something, typing "su" seems like a small price to pay for some protection against careless mistakes.

If you really really want to do what you say, then do "man chmod" to see how.

linuxguru2 06-05-2007 11:04 PM

I have to agree with everyone else here...you should only give your self root privelages when you absolutley need to. As Brian said, there are many ways you can run as root, depending on your Linux distro. In my case, I use Ubuntu 7.04 (Feisty Fawn), and i use sudo to run commands as root, but in some other systems, you may use su to gain root privelages. You'd have to try both to see. Brian's also right about mistyping commands or letters. A couple of my friends made that same mistake, and flushed about 3-5 years worth of work on a system down the toilet. Also, as Brian said, if you are unfortunate enough to get one of the FEW linux viruses out there, you could be looking at some serious trouble if you make everything root access. I also totally agree with what pixel said. I wouldn't recommend it, but hey it's your system. You have to make the call. We're just giving you some things to think about before you do it. All the best.

Linuxguru2.

fotoITguy 06-06-2007 12:39 AM

If you want to give yourself permissions on a set of files or a set of folders in files you would either change the permissions or ownership or both accordingly.

# man chmod
# man chown

example # chmod 540 /home/someuser/somefile.txt

or for a directory and the files therein:

chmod -R 540 /home/someuser/somedirectory

Also, chown will change ownership as such:

# chown someuser.somegroup /home/someuser/somefile.txt

to do this for everything is inappropriate as explained by the other posts.


All times are GMT -5. The time now is 03:56 AM.