LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 01-13-2016, 07:15 PM   #1
redhatwannabe
Member
 
Registered: Dec 2008
Posts: 83

Rep: Reputation: 15
How To Resolve cat: /proc/slabinfo: Permission denied properly


Dear all,

I have an existing script which has the following line

Code:
SLABINFO='cat /proc/slabinfo'
when I run the command manually, I encounter the following error:

Code:
[oracle@ol71-112-db ~]$ cat /proc/slabinfo
cat: /proc/slabinfo: Permission denied
my os is as follow:

Code:
cat /etc/oracle-release
Oracle Linux Server release 7.1
so how do I cat /proc/slabinfo without any permision error.

thanks and many thanks
 
Old 01-13-2016, 07:34 PM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Code:
[schneidz@hyper lq]$ ll /proc/slabinfo
-r--------. 1 root root 0 Jan 13 20:33 /proc/slabinfo
[schneidz@hyper lq]$ sudo cat /proc/slabinfo
...
 
Old 01-13-2016, 07:43 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
As you (should ...) know, the /proc "filesystem" is actually a Linux kernel API. These "files and directories" do not actually, physically, exist. Instead, your request to "do something with these (non-existent ...) 'things'" is interpreted and acted-upon by the kernel itself.

In this case, Linux is refusing to provide you with any information, because you are not root.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
sh: 1: cannot create /proc/sys/net/core/netdev_budget: Permission denied 5883 Linux - General 0 02-12-2015 01:44 AM
/proc/asound/card0/pcm0p/oss: Permission denied crane Linux - Hardware 4 08-23-2007 05:41 AM
Strange entry in `df` (df: `/var/named/chroot/proc': Permission denied) BWebb Linux - General 1 09-14-2006 10:08 AM
fc3 /proc/net permission denied adem0rdna Fedora 15 05-25-2005 11:08 PM
permission denied executing /proc/version syandoa Linux - Newbie 2 03-16-2004 01:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:48 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
Open Source Consulting | Domain Registration