LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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, 07: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, 07: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, 07:31 AM   #3
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Hiding somewhere on planet Earth.
Distribution: No distribution. OpenBSD operating system
Posts: 1,711
Blog Entries: 8

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

Original Poster
Blog Entries: 2

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, 07:59 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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, 08:00 AM   #6
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
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, 08: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, 08:13 AM   #8
Arjun
Member
 
Registered: Feb 2011
Posts: 120

Original Poster
Blog Entries: 2

Rep: Reputation: 0
Ok

Thanks for your replies

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

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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, 09: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, 11:44 AM   #11
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Yes....
 
Old 07-22-2012, 06:42 PM   #12
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,397

Rep: Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777
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, 01: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 01:55 PM
Changing permissions problem revenge80200 Linux - Newbie 5 07-09-2004 11:42 AM
problem changing file permissions on fat32 partition coolamit78 Linux - Software 4 01-18-2004 01:44 PM
Problem changing permissions on partition habitue Linux - Newbie 2 10-23-2003 08:56 AM
Changing permissions problem vexer Slackware 3 05-09-2003 12:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:40 PM.

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
Open Source Consulting | Domain Registration