CentOS 5 Server :: Can't Edit /etc/bashrc File / Make It Possible?
Apr 20, 2010
I am having a lil headache with it.
Some time ego i edited my /etc/bashrc file to add some aliases and colours for my ssh console.
Today i had a need to change few thing but for some reason i can't edit or delete this file any more.
I am logged as root.
rm bashrc
cannot remove, operation not permitted
chown and/or chmod fails as well with "not permitted" errors.
ls -Al | grep bashrc
-rw-r--r-- 1 root root 2514 mar 31 13:05 bashrc
recently I did some changes to my bashrc file the changes are as follows export JAVA_HOME=/usr/java/jre<version>/bin/ export PATH=$PATH:/usr/java/jre<version>/bin
how to edit or add codes to ~/.bashrc?? and also what is this bashrc if anyone could explain... i have tried editing this bashrc without success... how to save the changes in bashrc...
I am trying to make an application server that would contain simple ones like edit, openoffice, gimp, so on and so forth. I know how to access these using ssh but what I want is that the application runs on that server as it already does, but to open local files and save them locally.
I have installed Centos on my pc. Then I installed Emacs for text editing. when I brows on www folder and try to open a php file it opens but I don't have permission to edit the filehow can I open a file with Emacs with edit permission?
I recently upgraded from fc8. I am running two nvidia NVS 285 cards with four monitors and using nvidia driver 190.53-pkg1. I have one card up and running and can edit the config file and make to other two work I just can't get all four to work together.
I'm having a problem where I'm unable to delete a file, even as root. Any attempts to remove or otherwise modify the file result in 'Operation not permitted'.
# rm d91c6a6e_2a2d7_out.xml rm: remove regular file `d91c6a6e_2a2d7_out.xml'? y rm: cannot remove `d91c6a6e_2a2d7_out.xml': Operation not permitted
I am trying to edit the iptables to include some ports/ip for openfire server. The problem is the computer is very locked down with permissions...I logged in as ROOT with ID 0.Now the iptables has ROOT for permission BUT ID 1 which reflects BIN.As root i cant edit or chmod/chown the iptables. Here is what i tried:
1. change password of BIN - successfully changed with no errors BUT still cant su BIN with the new password...
2. tried changing the ID of ROOT to 1 but I dont have permission to use the command....
so anything i can do here??? I dont have permission with Shadow either...
I have a webGUI in php where users can make certain settings. How can I edit a file on a remote server from my php webserver? Currently I use my FTP client, vsFTPd and a chrooted user in a specific directory where the file resides. I think this is pretty save as long a nobody else uses my FTPclient. How can I make changes to this file on the remote server from within my php-code on my webserver ?? (so that not I need to make the changes but my users can do it from a html-form) I found this but the credentials for the FTP-connection are plain :
<?php $file = fopen ("ftp://loginasswd@server", "w"); if (!$file) { echo "<p>Unable to open remote file for writing. ";
[code].....
I use https for the webGUI, but I guess this does not mean the connection to the remote server will be encrypted also ? Can I use my FTP-user (has no shell) from within php to edit the file ?
I have a small problem on my Compaq Evo Centos 5.4 web server. The web server runs just fine, the problem is it fails to restart from a power outage. Simple edit the BIOS. No! For a reason I can't think of the keyboard stops working after a few key strokes following the F10 to enter BIOS setup. Then its a power cycle. If left to BOOT the PC and keyboard are fine. After hearing about viruses which get to the BIOS I will ask can NIX get that far so I can adjust the Power ON?
Do I need to restart the webserver if I make any change in the file index.html? Or should the changes get reflected when I open the page again without restarting the service?
I am using Ubuntu 9.10. I was installing network simulator 2. After installation I get the following message.
Please put /home/administrator/Downloads/ns-allinone-2.34/bin:/home/administrator/Downloads/ns-allinone-2.34/tcl8.4.18/unix:/home/administrator/Downloads/ns-allinone-2.34/tk8.4.18/unix into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.
[Code].....
My friend suggested that it is something to do with .bashrc file. I fund files like .bash.bashrc.
I am trying to include my directory /usr/sbin in it's serch path for executable files using an environment variable. Would the input be: PATH="/usr/sbin"? And also upon start up, my shell should create the PRINTER environment variable which should resolve to the word sales...would that input be: PRINTER="sales"? If someone could help me with these two questions,
The problem is I can't use $0 as reference because the script is only sourced not executed. I also don't want to hardcode the path because the location might change and there will be more copies. Is there an easy way to create this information from within the the sourced bashrc file? I use Gnu bash 2.05b on Suse Linux 9.
I have a problem with my script. The problem is the system keeps rebooting after I put the directory file in .bashrc. The intentional for putting the file in .bashrc is to run the script automatically after login as root, I don know why is this happen. It was working fine for the first time without putting the file in bashrc. I could break the loop after hitting the "ESC" key. would it be the script problems?
Here is my script count=20 while [ $count -gt 0 ];do sleep 1 echo Press ESC to break the operation ((count=count-1))
I have installed a software and set the variables in the .bashrc file to avoid setting them everytime I would like to run te software. Now I have installed a new software and would like to do the same thing in the .bashrc file.How can I add the path to the new software directory without affecting the first software path.
After saving above changes, I enter the command: source ~/.bashrc Now if I do echo $PATH, the path shows both the old PLAY_HOME and new PLAY_HOME. This is really bad and messes up a lot of things in my project. This problem only goes away if I logout or reboot, a rather very long process. What is happening is that the old path is added to new path element and the old path includes the old path element you want to remove.
Im running cent os 5.5 64 bit. I simply want to type in a url (In my browser) on my windows desktop, that downloads a zipped folder from my cent os server.
I want to play around my .bashrc file, but I can't seem to find a general guide to customizing it. I just want a guide that will show me examples and explain them in-depth.
If I want to modify my .bashrc file to change the HISTSIZE would the following command be for example; HISTSIZE=200? And if I want to change the DEBUG_LEVEL to 8 would the following command be; DEBUG_LEVEL=8?
I wish a easy server with CentOS. I need only: ssh, ftp for backup , sftp for over the web, apache2 php5 mysql webserver, easy install printserver for a laserprinter with a com-port, and in the future a samba server. make a choice which version i need with CentOS. I am a beginner at all.I only know things about ubuntu server. I like to know the differences.
Because I had some difficulties to make awstats running (I'm not an expert!), I would share my experience with a MINI STEP BY STEP GUIDE. I would like also to discuss some details with experts thus at the end of the guide ,I'll make some questions to them:
I have installed a new server Centos 5.5 32 bit and configured 3 virtual hosts; at the end of /etc/httpd/conf/http.conf I have: