Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
|
|
07-22-2012, 07:21 AM
|
#1
|
Member
Registered: Feb 2011
Posts: 120
Rep:
|
Problem in changing permissions
I want to change the permission of a file in /proc/self called environ
When i change the permission of this file as a root
then i gets an error message
Quote:
chmod: changing permissions of `environ': Operation not permitted
|
Why i am not able to change the permissions ?
Thanks
|
|
|
07-22-2012, 07:30 AM
|
#2
|
Senior Member
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238
Rep:
|
/proc is a virtual filesystem. Why do you want to change permissions there?
|
|
|
07-22-2012, 07:31 AM
|
#3
|
Senior Member
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
|
First; You may not be entering the proper command. (A mistake in the file path.)
Second; Why do you want to do this? I just checked this file.
Code:
GNOME_KEYRING_PID=405
You want to allow unlimited access to the keyring?
Mr. Alex posted before I did. His virtual file system sheds some light, but I am still confused.
Last edited by Randicus Draco Albus; 07-22-2012 at 07:34 AM.
|
|
|
07-22-2012, 07:33 AM
|
#4
|
Member
Registered: Feb 2011
Posts: 120
Original Poster
Rep:
|
I am entering the proper command. I am sure
I just want to do it for some testing purpose
Is there any way to do this ?
|
|
|
07-22-2012, 07:59 AM
|
#5
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
You have to have the right permissions on the parent folder before you can change what's inside.
Bad news: diddling with proc can crash your system in a hurry---I hope you have a good reason
|
|
1 members found this post helpful.
|
07-22-2012, 08:00 AM
|
#6
|
Senior Member
Registered: Feb 2009
Posts: 4,667
|
Quote:
Originally Posted by Arjun
I am entering the proper command. I am sure
I just want to do it for some testing purpose
Is there any way to do this ?
|
You did it, you know the results of the test (permissions of /proc cannot be changed).
In the future, better to understand permissions and Linux file structure before testing (unless you are intentionally trying to break the system to see what will happen).
|
|
2 members found this post helpful.
|
07-22-2012, 08:00 AM
|
#7
|
Senior Member
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238
Rep:
|
|
|
1 members found this post helpful.
|
07-22-2012, 08:13 AM
|
#8
|
Member
Registered: Feb 2011
Posts: 120
Original Poster
Rep:
|
Ok
Thanks for your replies
I thought, as a root i can change the permission of it.
|
|
|
07-22-2012, 08:44 AM
|
#9
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
Quote:
Originally Posted by snowpine
You did it, you know the results of the test (permissions of /proc cannot be changed).
|
They can on my system:
Code:
[root@herring_desk /]# ls -l|grep proc
dr-xr-xr-x 208 root root 0 Jul 20 04:56 proc
[root@herring_desk /]# chmod 777 proc
[root@herring_desk /]# ls -l|grep proc
drwxrwxrwx 208 root root 0 Jul 20 04:56 proc
(Yes, I changed it back----No, I don't do this kind of thing.... )
|
|
|
07-22-2012, 09:11 AM
|
#10
|
Senior Member
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238
Rep:
|
Can you change them inside of /proc?
|
|
|
07-22-2012, 11:44 AM
|
#11
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
Yes....
|
|
|
07-22-2012, 06:42 PM
|
#12
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,397
|
Given that /proc is basically a window into the kernel, any change will vanish on reboot.
I've heard of people changing content in there, but never ownerships or perms...
|
|
|
07-23-2012, 01:16 AM
|
#13
|
Member
Registered: Feb 2009
Posts: 347
Rep:
|
You can change the permissions of files under /proc.
OP: If you are trying to change the permissions using sudo, try logging in as root and then change the permissions i.e.
"sudo -i" will change you to root then use chmod and see if you can chnge the permissions.
|
|
|
All times are GMT -5. The time now is 12:40 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
|
|