LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-21-2004, 12:52 AM   #1
RevX
LQ Newbie
 
Registered: Apr 2004
Posts: 11

Rep: Reputation: 0
Question Even as root, Permission Denied


I recently downloaded and installed 'hotwayd'. But, now, I need to make some changes to certain files in order for it to work. One of them is /etc/xinetd.conf. I can open it, but if i make changes, i can't save. So, i access it in the shell, after using 'su' to become root, i try to open it, but this happens:

Code:
[root@localhost etc]# ./xinetd.conf
bash: ./xinetd.conf: Permission denied
I've tried "su -c ./xinetd.conf" but to no avail. Any suggestions.

I have Mandrake and am running KDE

Thanks in Advanced!

Last edited by RevX; 04-21-2004 at 12:55 AM.
 
Old 04-21-2004, 01:10 AM   #2
e1000
Member
 
Registered: Oct 2003
Location: California
Distribution: Ubuntu
Posts: 582

Rep: Reputation: 30
you want to edit it right? if thats the case then type
[root@localhost etc]# vi ./xinetd.conf
or
[root@localhost etc]# pico ./xinetd.conf
both of those are CLI text editors

well, If you didnt want to get that error while using your current command, do 'chmod +x /etc/xinetd.conf', but for some reason I dont think your intention is to execute the file as a script. (I would recomend aganst it, as it may inadvertantly contain harmfull commands. ie; 'rm -rf /')
 
Old 04-21-2004, 01:14 AM   #3
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
./xinetd.conf
means you are trying to execute it, and it isn't executable. When you are root,
vi or vim or pico or nano or emacs /etc/xinetd.conf

root will be able to save it.

RO
 
Old 04-21-2004, 01:16 AM   #4
youngri
Member
 
Registered: Jun 2003
Location: Sydney Australia
Distribution: SUSE / PCLinuxOS / MEPIS
Posts: 65

Rep: Reputation: 15
This might be a simplistic answer, so apologies if it sounds condescending.

xinetd.conf is a text file and is not executable so running it with ./ will not work.

You need to use an editor such as vim or pico to open it.

Alternatively, in KDE there is a menu option to run the file manager with root privileges. You could use this to open the file in the normal way.

I hope this helps

Kind Regards

Richard.
 
Old 04-21-2004, 02:02 AM   #5
RevX
LQ Newbie
 
Registered: Apr 2004
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks to the 3 of you. As you can tell, i'm a (this is day 2 with Mandrake)

Oops... didn't know that ./ was for executables only... but, i'm learning more each day!
 
Old 04-21-2004, 07:03 AM   #6
MiscGeek
Member
 
Registered: Jan 2003
Location: Georgia, US
Distribution: RHEL WS4
Posts: 189

Rep: Reputation: 30
Quote:
Originally posted by RevX
Thanks to the 3 of you. As you can tell, i'm a (this is day 2 with Mandrake)

Oops... didn't know that ./ was for executables only... but, i'm learning more each day!
Actually, ./ just represents the current directory. The reason the shell assumed you wanted to run an executable was because you specified the filename without a preceding command

BTW, welcome to the world without gates
 
Old 04-22-2004, 02:43 AM   #7
e1000
Member
 
Registered: Oct 2003
Location: California
Distribution: Ubuntu
Posts: 582

Rep: Reputation: 30
Quote:
Originally posted by MiscGeek
Actually, ./ just represents the current directory. The reason the shell assumed you wanted to run an executable was because you specified the filename without a preceding command
to continue on his train of thought, in BASH (the most common linux shell) you need to specify the absolute path of an executable for it to work. so if you want to execute 'funny-script' and its located in /home/foo/scripts/ you couldnt just cd to that directory and type 'funny-script' you would either have to type
'/home/foo/scripts/funny-script'
or if you were in the same directory you would type ./funny-script,
the '.' in ./ stands for the entire path leading to that current directory.

now you might wonder why typing 'vim' at the terminal executes the vim executable, well that is because your system has a set of varriables telling bash where to look for a executable when no absolute path is specified. normally exe's are in /bin, /sbin /usr/bin, /usr/sbin and a few more places.

I hope this helped you more than it confused you.
 
Old 04-25-2004, 12:10 AM   #8
RevX
LQ Newbie
 
Registered: Apr 2004
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks Again

Thanks again to all of you... You were very informative and helpful. You've made the transition a lot easier!
 
  


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
permission denied as root Foosed Slackware 6 06-06-2005 01:38 AM
permission denied when root? TaNeK Linux - Software 8 02-01-2005 01:39 PM
Permission denied as root Cynric Linux - General 4 08-15-2004 12:47 PM
Permission denied as Root! Thewyzewun Linux - Newbie 3 03-13-2004 12:51 PM
permission denied even as root awolff01 Linux - Software 8 02-28-2003 08:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:32 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