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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
changed ownership this dir to user by running # chown -R $USER /usr/src/redhat as required for installing microsoft fonts. how can i change it back its original settings. i tried chown -R $root /usr/src/red hat but that didn't work. does anyone have any good links that explain what this command and related commands do.
http://corefonts.sourceforge.net/ is where i got the command from but if you dont think i need to change it back to what it was ill leave it the way it is. i thought though for security reasons that it might be a good idea to have only root access to this dir.
[root@dhcp-346-5 joe]# chown -R $root /usr/src/redhat
chown: too few arguments
Try `chown --help' for more information.
Hmm, that was a helpful reply there from 'proud'. Why waste so many characters when all you meant was RTFM? I'm new round here, so sorry if saying that's against site ettiquette.
illtbagu - the reason your command says 'too few arguments' is because the arg you are passing - $root is a bash parameter (like a shell variable). What you actually want to give is root, the name of the root user, or simply 0 - no dollarsign! $ is a special char in bash which means 'the word succeding me is a variable/parameter name'. By default these variables/parameters are empty so your command is getting expanded to:
# chown -R /usr/src/redhat
which is a bad because you must supply a username to chown.
What you meant was probably:
# chown -R root /usr/src/redhat
the stuff masterc mentions about using root:root that will also set the group to root. It's a more complete way of doing it.
For more info on shell vars and params, do a man bash.
Nice explaination. Yeah, sometimes a "check out the man page on chown" is a perfectly fine answer, other times, such as this, I doubt the manpage would help. They form in which they posed chown wasn't wrong, just the person to whom they were trying give ownership was. I don't think the man page would really cover that.
Thanks for the further explaination sorryouttolunch.
Cheers! Yeah, what I was trying to get at was that the guy's problem was with bash expansions not chmod... in that respect I thought 'do a man chown' was a bit mean ;-)
Your reply was totally right in what it said. Infact, i woulda forgot to say root:root so it woulda been better than one from me on its own... i really must stop being lazy about group ownerships *sigh*