possible bug in /proc filesystem?

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

 



I'm trying to list all opened fd (file descriptors) through /proc by apache, using the following method:

- in apache process (php script), traverse /proc entries for all processes owned by 'apache' user
- find out all 'fd' directories and list all symlinks inthere
- use that data to find out all files opened by apache

My problem is that I can't do that as the apache user, the directory /proc/1234/fd/ is owned by root even if the process 1234 is apache (and runs under 'apache' user and 'apache' group).

Is this a bug in /proc filesystem? Or is there a functionality in kernel made for apache so it is able to somehow modify 'fd' directory in proc to not be owned by apache but by root instead?

I am willing to patch kernel sources in /fs/proc/* in order to get a better behavior, would anybody please suggest what function in kernel's proc sources to modify in order to either force apache owner for the 'fd' directory or to make it 'executable by all' so I could list the links inthere even without the need to be root?

Thank you very much

Tomas M

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux