The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

grabbing the contents of proc/uptime without changing server config

Discussion in 'Security' started by durangod, Aug 14, 2014.

  1. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    I need to grab the contents of the proc/uptime either via cron ->php or via php directly. I have set my VPS to disable shell_exec as well as proc files. So without changing that config, can i access the proc/uptime contents locally and just store them 1x an hour without having to open up a hole in the firewall?

    Or i could grab and store it via root and store it in a less permissioned file and then grab it locally from the less permissioned file.. If i did that how would i copy the contents of proc/uptime 1x an hour over to the other file.?

    for example copy uptime (644 permission) -> to new file(666 permission) then pull the data from the new file down to the php level or cron level.

    Thanks..
     
    #1 durangod, Aug 14, 2014
    Last edited: Aug 14, 2014
  2. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    nevermind i got it whoooo hewwwwwww lol.... this config is really starting to make sense to me now in more ways ever day...i have the data locally now and no change in permissions..

    thanks all
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    I am happy to see you were able to resolve the issue. Feel free to let us know what method you used if you think other users might find it helpful.

    Thank you.
     
  4. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    NP :) sorry i guess i was so excited i forgot lol... I was poking around in root via ssh looking for a good place to copy the file to and i stumbled upon a place that i said to myself...

    Thats when the lightbulb came on and i knew all i had to do was move my proc call above the public_html and bam when i did it loaded perfectly.

    :)
     
Loading...
Similar Threads - grabbing contents proc
  1. Michael Mihalyfi
    Replies:
    3
    Views:
    253

Share This Page