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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
![Reply](https://www.linuxquestions.org/questions/images/buttons/reply.gif) |
12-20-2003, 06:15 PM
|
#1
|
Member
Registered: Nov 2003
Posts: 48
Rep:
|
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?
|
|
|
12-20-2003, 06:26 PM
|
#2
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
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.
|
|
|
12-20-2003, 06:42 PM
|
#3
|
Member
Registered: Nov 2003
Posts: 48
Original Poster
Rep:
|
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.
|
|
|
12-20-2003, 06:59 PM
|
#4
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
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.
|
|
|
12-20-2003, 07:17 PM
|
#5
|
Member
Registered: Nov 2003
Posts: 48
Original Poster
Rep:
|
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
|
|
|
12-20-2003, 07:59 PM
|
#6
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
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
$
|
|
|
All times are GMT -5. The time now is 05:50 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|