LinuxQuestions.org
Visit Jeremy's Blog.
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-23-2012, 09:46 PM   #1
Ariontor
LQ Newbie
 
Registered: Oct 2012
Location: Provo, UT
Distribution: Slackware
Posts: 6

Rep: Reputation: Disabled
Limits of root user


Why can’t root just cd to someone’s home directory and run a program called a.out in that directory by typing “a.out” in Linux?
 
Old 10-23-2012, 10:00 PM   #2
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,493

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
Root can do that. What is the exact error message?

Obviously the file must be executable, and you must indicate the current directory, ./a.out

jlinkels
 
Old 10-23-2012, 10:09 PM   #3
Ariontor
LQ Newbie
 
Registered: Oct 2012
Location: Provo, UT
Distribution: Slackware
Posts: 6

Original Poster
Rep: Reputation: Disabled
Yes, I thought root could do that, but this exact question is from a job questionnaire concerning the Linux command-line, so I'm wondering what they wanted because it seems doubtful that it is just a trick question.
 
Old 10-23-2012, 10:10 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
When you type the name of an executable, such as "a.out", it searches through all the directories in your PATH environment variable to find the executable. If it can't find it in any of the directories in PATH, it will error out. For executables that are not in your PATH, you need to specify the path, either relative or absolute, to the executable when you run it, such as "./a.out" if it's in your CWD, or "/home/user/a.out" if that's where it lives.
 
1 members found this post helpful.
Old 10-23-2012, 10:17 PM   #5
Ariontor
LQ Newbie
 
Registered: Oct 2012
Location: Provo, UT
Distribution: Slackware
Posts: 6

Original Poster
Rep: Reputation: Disabled
Okay, that makes sense; thank you. Also does PATH stand for anything? Just curious.
 
Old 10-24-2012, 05:47 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Well, its not an acronym, its actually the list of dir paths (sic) that your process looks in if you call a cmd without specifying where to find it eg
Code:
echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/myuser/bin
Here's some good links
http://rute.2038bug.com/index.html.gz
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
http://www.tldp.org/LDP/abs/html/
 
  


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
Protecting a multi-user server, per-user limits askest Linux - Software 1 02-08-2010 03:34 PM
How do I run jack well as normal user instead of root? NO /etc/security/limits.conf! el_b Linux - Software 4 09-24-2009 08:02 PM
Website user size limits? corbintechboy General 6 07-02-2008 11:46 AM
user account time limits DAChristen29 Linux - Networking 2 12-24-2004 07:00 PM
Samba User Home Drive Size Limits sunnyee Linux - Networking 3 07-13-2004 07:57 PM


All times are GMT -5. The time now is 06:41 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration