LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
LinkBack Search this Thread
Old 12-20-2003, 05:15 PM   #1
endezeichen
Member
 
Registered: Nov 2003
Posts: 48

Rep: Reputation: 15
permission denied error


I'm logged in as root, and still get that error when using simple commands such as 'cd'
Anyone know how to fix this?
 
Old 12-20-2003, 05:26 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 194Reputation: 194
What are you trying to cd into when getting this error? This isn't related to your mounting issue your asking about is it? If it is I would ask you to keep the same discussion in the same thread.

Regards.
 
Old 12-20-2003, 05:42 PM   #3
endezeichen
Member
 
Registered: Nov 2003
Posts: 48

Original Poster
Rep: Reputation: 15
Im trying to edit my bash_profile to include java. I can't write to the file and was told to use this command along with other things to edit the file through emacs. This isn't the only command that gives me this error. It's happening with almost anything important i'm trying to do and it's getting annoying.
 
Old 12-20-2003, 05:59 PM   #4
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 194Reputation: 194
Why would you need to "cd" into your .bash_profile file? Is this root's .bash_profile file or a users? If its root's, I hope you not just logged in as root all the time, bad security practice.

If your logged in as a user, have you tried editing the file using pico or vi to make your changes? And it should be .bash_profile as well or edit even your .bashrc file in your users home directory.
 
Old 12-20-2003, 06:17 PM   #5
endezeichen
Member
 
Registered: Nov 2003
Posts: 48

Original Poster
Rep: Reputation: 15
This is the advice I pulled off of another thread which was called "the simple way" to edit read only files. This is one of the things I am trying to do which is giving me the error.

just log in as root in your console (xterm, konsole, what-have-you)
#su
#<password>
cd <dir where file resides>
<your favorite editor> <filename>

make your changes
save your changes

-Example---------------------------
(assuming an open terminal window here)
su
<password>
emacs /etc/modules.conf
<modified lines, added lines, deleted lines what-have-you>
<ctrl><x><ctrl><s>
<ctrl><x><ctrl><c>
-End Example-----------------------

Thanks
 
Old 12-20-2003, 06:59 PM   #6
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 194Reputation: 194
Quote:
Originally posted by endezeichen
This is the advice I pulled off of another thread which was called "the simple way" to edit read only files. This is one of the things I am trying to do which is giving me the error.

just log in as root in your console (xterm, konsole, what-have-you)
#su
#<password>
cd <dir where file resides>
<your favorite editor> <filename>

make your changes
save your changes

-Example---------------------------
(assuming an open terminal window here)
su
<password>
emacs /etc/modules.conf
<modified lines, added lines, deleted lines what-have-you>
<ctrl><x><ctrl><s>
<ctrl><x><ctrl><c>
-End Example-----------------------

Thanks
emacs can be daunting at times. Have you tried using another editor? Like pico, vi or vim?

$ su
$ <password>
# vi /etc/modules.conf
<make changes>
<if using vi or vim, I (eye) is to insert, ESC is to go back to the command so you can type :wq! or Shift ZZ to save your changes. x will delete one character, dd will delete the whole line, and so on.>
# exit
$
 
  


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Permission denied error when printing with CUPS Davidian1024 Linux - Software 3 07-18-2005 01:47 PM
java n fc3, error permission denied AVD_ZM Linux - Software 1 05-23-2005 03:46 AM
Samba error: Permission denied dmkang Linux - Software 6 04-01-2005 08:29 AM
sasldb Permission denied error shino Linux - Networking 0 01-15-2004 03:55 PM
FSTAB / Permission Denied Error clearh20 Linux - Newbie 5 06-10-2003 12:43 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration