LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 07-22-2012, 08:21 AM   #1
Arjun
Member
 
Registered: Feb 2011
Posts: 120
Blog Entries: 2

Rep: Reputation: 0
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

Quote:
chmod 777 environ
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
 
Old 07-22-2012, 08:30 AM   #2
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
/proc is a virtual filesystem. Why do you want to change permissions there?
 
Old 07-22-2012, 08:31 AM   #3
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: OpenBSD
Posts: 1,644
Blog Entries: 8

Rep: Reputation: 577Reputation: 577Reputation: 577Reputation: 577Reputation: 577Reputation: 577
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 08:34 AM.
 
Old 07-22-2012, 08:33 AM   #4
Arjun
Member
 
Registered: Feb 2011
Posts: 120
Blog Entries: 2

Original Poster
Rep: Reputation: 0
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 ?
 
Old 07-22-2012, 08:59 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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.
Old 07-22-2012, 09:00 AM   #6
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 4,037

Rep: Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099Reputation: 1099
Quote:
Originally Posted by Arjun View Post
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.
Old 07-22-2012, 09:00 AM   #7
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
http://forums.debian.net/viewtopic.php?f=5&t=46494
 
1 members found this post helpful.
Old 07-22-2012, 09:13 AM   #8
Arjun
Member
 
Registered: Feb 2011
Posts: 120
Blog Entries: 2

Original Poster
Rep: Reputation: 0
Ok

Thanks for your replies

I thought, as a root i can change the permission of it.
 
Old 07-22-2012, 09:44 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by snowpine View Post
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.... )
 
Old 07-22-2012, 10:11 AM   #10
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Can you change them inside of /proc?
 
Old 07-22-2012, 12:44 PM   #11
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Yes....
 
Old 07-22-2012, 07:42 PM   #12
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
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...
 
Old 07-23-2012, 02:16 AM   #13
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
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.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Changing Permissions imkornhulio Linux - Server 3 03-02-2009 02:55 PM
Changing permissions problem revenge80200 Linux - Newbie 5 07-09-2004 12:42 PM
problem changing file permissions on fat32 partition coolamit78 Linux - Software 4 01-18-2004 02:44 PM
Problem changing permissions on partition habitue Linux - Newbie 2 10-23-2003 09:56 AM
Changing permissions problem vexer Slackware 3 05-09-2003 01:33 AM


All times are GMT -5. The time now is 02:31 AM.

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