Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-07-2006, 10:48 AM   #1
Registered: Aug 2006
Distribution: slack
Posts: 323

Rep: Reputation: 30
file execution

there is a "file" in /root which permissions are:
-rw-r--r-- 1 root root

when i try:
/root/file <-'
answer is "permission denied"
when i try the same with a "." at the beggining - file executes!?
. /root/file <-'

and i'm trying this as a normal user (!root)
how to explain??
Old 11-07-2006, 11:01 AM   #2
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
If the permissions for file are:

-rw-r--r-- 1 root root

This file is not executable

/root is the home directory of the supersuser root and a normal user should not be able to do anything in that directory.

/root on a typical install is not included in the PATH so if you were root and wanted to execute file you would have to type the absolute path to the file.
Old 11-07-2006, 11:25 AM   #3
Registered: May 2006
Location: England
Distribution: Slackware 10.2, Slamd64
Posts: 249

Rep: Reputation: 31
when i try the same with a "." at the beggining - file executes!?
. /root/file <-'
No, it doesn't. It is sourced into the current shell, which is not the same as executing the file as a script.

And as fordeck says, you shouldn't be able to acces this file as a normal user. Make sure the permissions for /root are 700 (-rwx------).


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
file execution zaid Linux - General 3 01-18-2006 05:32 AM
file execution zaid Linux - General 1 01-17-2006 07:28 PM
File execution on ftp (vsftpd) rkemp General 1 03-13-2004 07:48 AM
file execution doubt pongsu Linux - General 2 09-25-2003 01:23 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:37 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration