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.
|
 |
01-23-2006, 11:05 AM
|
#1
|
LQ Newbie
Registered: Jul 2005
Location: Sussex, England
Distribution: SUSE 9.3, Ubuntu Breezy
Posts: 14
Rep:
|
Accidentally changed the permissions of /proc/, help restoring them please
Hi
I have just accidentally changed the permissions of my proc folder with the command
sudo chmod 766 /proc/
this has cause my system monitor 2 stop working in the gnome panel, and im sure there are security risks to this mistake, so how can i restore the former permissions?
thanks
James
|
|
|
01-23-2006, 11:47 AM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790
Rep:
|
Reboot, the /proc location does not really exist and rebooting will fix your problem.
|
|
|
01-23-2006, 11:49 AM
|
#3
|
LQ Guru
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Rep: 
|
proc appears to be 555 and you didn't make the command recursive so it may be as simple as
sudo chmod 555 /proc/
read = 4
Write = 2
Execute = 1
by changing from 5 which is read and execute to 6 with is read and write you removed the ability for programs that are not running as root to cd into the direcrtory. so your system monitor which runs as a regular user is unable to access the proc directory to obtain CPU or Memory info etc..
I would suggest not changing permissions on system directories.. never a good thing.
|
|
|
01-23-2006, 12:08 PM
|
#4
|
Senior Member
Registered: Nov 2004
Distribution: Mint, MX, antiX, SystemRescue
Posts: 2,337
|
Do as Lenard says - reboot. /proc is not physical disk space. It's system memory made to look like disk. You write to /proc and you're altering the memory image of your OS. This can be an incredibly powerful thing to do, but also fraught with peril for the uninitiated. You can easily crash your system. However, a simple reboot and you're good to go. You get a fresh start. That's assuming that your writes to /proc didn't hose the system so bad that you corrupted your filesystems. I woudln't expect that a chmod like you did would do any damage that a reboot wouldn't clear.
|
|
|
01-23-2006, 03:51 PM
|
#5
|
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,134
|
I'm rather bemused to hear that the permissions of /proc even can be changed... Not entirely happy to hear that, although I haven't verified it (and probably won't).
Anyhow, /proc, /sys are both "virtual" filesystems; they do not actually exist, but are a figment of the kernel's imagination. Anytime you do anything at all in those directories, the kernel is actually the one that serves up the goodies. It simply delivers them to you as "text files" in "directories."
For example, if you did ls /proc right now, you'd see (among other things) a numbered "directory" corresponding to each process that exists on your system right now. Do it again a few moments later and the contents of that "directory" will have changed. Each time you "list the contents of" this "directory," Linux scans its internal process-table and serves up a "directory" for each process that it finds, among other things. There are also a bunch of other settings, which are made to appear as "files" or other "directories."
It happens to be a particularly-elegant way for Linux to serve-up system settings to you. (For example, it allows programs like ps to be completely non-privileged.) But it's not a "real" directory with "real" files in it.
|
|
|
01-24-2006, 03:24 AM
|
#6
|
LQ Newbie
Registered: Jul 2005
Location: Sussex, England
Distribution: SUSE 9.3, Ubuntu Breezy
Posts: 14
Original Poster
Rep:
|
Thanks guys, both changing the permissions back while running, and rebooting solved the problems, as it is indeed a virtual file system.
This explains why the proc/ directory was empty on my second hard drive
|
|
|
All times are GMT -5. The time now is 06:35 PM.
|
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
|
|