LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-15-2011, 04:57 AM   #1
bellotranzi
LQ Newbie
 
Registered: Feb 2011
Posts: 1

Rep: Reputation: 0
With PS you can not control the processes of another user


Hi everybody,

I have a problem with the permission of the directories under /proc, they are readable and accessible only by Owner (they have permission 500 instead of the usual 555) As a consequence, the processes are visible only to the Owners or to Root. For exampleif I want to check if there is mysql

# ps -ef | grep mysqld
mysql 2611 1 0 12:14 ? 00:00:06 /usr/sbin/mysqld

I see it only with the user mysql or with root because the directory has permission 500
dr-x------ 6 mysql mysql 0 2011-02-11 12:14 /proc/2611/

this problem obstacles the functioning of some applications that should check the existence of some processes managed by other users. At the beginning all was working well. But after a while the problem appeared and I don’t know which is the reason of it.


Can you tell me how to restore the standard management of permissions of / proc?]

I have a Ubuntu server Maverick 10:10.

Thanks.
 
Old 02-15-2011, 08:28 AM   #2
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by bellotranzi View Post
Hi everybody,

I have a problem with the permission of the directories under /proc, they are readable and accessible only by Owner (they have permission 500 instead of the usual 555) As a consequence, the processes are visible only to the Owners or to Root. For exampleif I want to check if there is mysql

# ps -ef | grep mysqld
mysql 2611 1 0 12:14 ? 00:00:06 /usr/sbin/mysqld

I see it only with the user mysql or with root because the directory has permission 500
dr-x------ 6 mysql mysql 0 2011-02-11 12:14 /proc/2611/

this problem obstacles the functioning of some applications that should check the existence of some processes managed by other users. At the beginning all was working well. But after a while the problem appeared and I don’t know which is the reason of it.


Can you tell me how to restore the standard management of permissions of / proc?]

I have a Ubuntu server Maverick 10:10.

Thanks.
Err....why don't you change the permission of /proc to 555?

Code:
#chmod 555 /proc
 
Old 02-15-2011, 09:09 AM   #3
cepheus11
Member
 
Registered: Nov 2010
Location: Germany
Distribution: Gentoo
Posts: 286

Rep: Reputation: 91
Quote:
Originally Posted by bellotranzi View Post
For exampleif I want to check if there is mysql

# ps -ef | grep mysqld
There are better ways to check if mysqld is running (or any service):

Code:
$ /etc/init.d/mysql status
or

Code:
$ service mysql status
(depending on your distribution)

Or test for the pid file:

Code:
$ test -e /var/run/mysqld/mysqld.pid
(exact path depends on destribution and maybe on version)

You could also check the output of netstat for the port mysql listens to, but this would be less clean and future-proof.

Last edited by cepheus11; 02-15-2011 at 12:27 PM. Reason: typo
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use ulimit to control processes? windows_usr Linux - Newbie 1 04-04-2008 04:47 PM
A question about processes, threads and control lumix Linux - General 8 10-29-2007 09:29 PM
Control amount of time a user may be logged in. (Parental Control) darrensnospam Mandriva 13 02-18-2006 05:01 PM
Control over parent of processes? Sinope Linux - General 0 09-27-2004 12:20 AM
Looking for the file that control what processes are loaded! sjia Linux - Software 1 04-08-2004 12:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:00 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