Re: unable to access /proc/<pid>/fd directory in Apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I think it is possible to run sudo lsof right? this will run lsof as a superuser. we can configure sudo to not ask passwd when running this command. another option is a setuid
bit.
Regards,
Prashant Keshvani
Merce Technologies
Mumbai

Anuradha wrote:
Hi All,

In apache I want to find the list of process which are accessing the file.

I am using the lsof command with popen system call.
For each process with pid a directory will be created in /proc. In /proc/<pid>/fd directory list all the files which are beeing used by the process.

But in my case /proc/<pid> owner is apache but /proc/<pid>/fd owner is root with read permission only to owner i.e root. As a result my apache module is not able to access the /proc/<pid>/fd directory to check process which are holding particula file handler say X.

Does any one has an idea of access those file from apache.

Thanks,
A.



------------------------------------------------------------------------
Love Cricket? Check out live scores, photos, video highlights and more. Click here <http://in.rd.yahoo.com/tagline_cricket_2/*http://cricket.yahoo.com>.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux