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.

Path to /scripts

Discussion in 'General Discussion' started by strauberry, May 31, 2003.

  1. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi,
    where can I find the /scripts-directory?? I found one in the root-dir but there I cant find a lot of files, e.g. listaccts... where are these files located??

    THANK YOU!!
    strauberry

    cPanel.net Support Ticket Number:
     
  2. carlgm

    carlgm Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    103
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    England, UK
    You do this.

    Step 1) Login as 'root'.
    Step 2) cd /scripts
    Step 3) ls

    That will show you all the scripts cpanel has. :)

    cPanel.net Support Ticket Number:
     
  3. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi,
    thank you but I allready know that dir (as I wrote: I found one in the root directory...)
    But there is no edituserlist or servup. Where are these files??? I scaned my whole hdd but nothing. And where is the /scripts2 directory??

    Thank you!
    strauberry

    cPanel.net Support Ticket Number:
     
  4. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    now I got a new question: I saved the file adddns as test . Now I added a link to /scripts/test in the command-file... but nothing! Does it depend on the filename whether it is executed or not?? The code is complet correct I just changed the filename...

    (I want to write my own script which can be executed in the reseller-area, so I try to create a file in the /scripts directroy but all my files aren't executed. Is there another path I can link to??)

    THANK YOU SO MUCH!!

    strauberry

    cPanel.net Support Ticket Number:
     
  5. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA
    many of those "scripts' you are looking for in WHM aren't inside that folder. They are compiled into WHM.

    cPanel.net Support Ticket Number:
     
  6. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi,
    ok sorry I'm not really interested in one of those scripts :) I just want to write my own phpscript which should be used in the reseller-area ( =WHM). Now my question is, where do I have to save them, which rights, owner, .... so they are executed (I saved a phpinfo.php4 in the scripts dir with the rights 700 and owner root but nothing, empty page)

    THANK YOU!!
    strauberry

    cPanel.net Support Ticket Number:
     
  7. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    oh come on there must be at least one person who knows that!!

    cPanel.net Support Ticket Number:
     
  8. carlgm

    carlgm Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    103
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    England, UK
    If you know how to write a skin, then you must know what to do with the php scripts. :)

    You should chmod ALL standard php scripts to 644, UNLESS you require the php script to WRITE to anything. Then you should use 666.

    If you wish to run any of the scripts by simply going to the /scripts directory. You will be able to run them by using either.

    sh scriptname
    or
    perl scriptname

    It's one of the other, some are shell scripts and others are perl scripts. :)

    The /scripts directory contains ALL the scripts, there is no other directory for you to use.

    cPanel.net Support Ticket Number:
     
  9. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Try putting the file in /usr/local/cpanel/whostmgr/docroot then you can call it as http:/serverdomain:2086/filename

    cPanel.net Support Ticket Number:
     
  10. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Very incorrect.

    cPanel.net Support Ticket Number:
     
  11. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Oh dgbaker I could kiss you :D Now I can use it as I want it!!!! Thank you for your great (and simple) idea! Oh I would have spend weeks to find this solution!

    T H A N K Y O U !!!

    cPanel.net Support Ticket Number:
     
  12. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    ok, one last thing: when I'm logged in as root the scripts runs without any problems... when I'm logged in with a reseller-username, the scripts is not compiled (php4). Why?

    Thank you again :)

    strauberry

    cPanel.net Support Ticket Number:
     
  13. DigiCrime

    DigiCrime Well-Known Member

    Joined:
    Nov 27, 2002
    Messages:
    399
    Likes Received:
    0
    Trophy Points:
    16
    at the prompt there type this in ls -alF and see who the script is owned by. Only root can run anything on the server, but users and resellers cant run files if it is owned by root. If its owned by root till look something like this

    -rw-r--r-- 1 root root 100 May 11 2001 somefile.sh

    cPanel.net Support Ticket Number:
     
  14. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi,
    which owner must they have that everybody can run the script (via browser!)?

    Thank you!
    strauberry

    cPanel.net Support Ticket Number:
     
  15. DigiCrime

    DigiCrime Well-Known Member

    Joined:
    Nov 27, 2002
    Messages:
    399
    Likes Received:
    0
    Trophy Points:
    16
    Whatever the username is for that account, is what it should be listed as when you do a ls -alF on it. So if the username was resell and you do an ls -alF and it says otherwise, you would need to change it back to the username. you can do this by typing in the following

    chown theirusername somefile.sh
    chgrp theirusername somefile.sh

    cPanel.net Support Ticket Number:
     
  16. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    thank you but there's one problem: the script is not called via SSH but via Browser. In the left Frame there will be a link "edit theme"... and on the right side there should be the script. I can't change the owner with each calling :)

    Thank you for more ideas

    strauberry

    cPanel.net Support Ticket Number:
     
  17. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Chown it too root:wheel

    cPanel.net Support Ticket Number:
     
  18. strauberry

    strauberry Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Hi dgbaker,

    thank you for your hint, but no result :( I changed the owner to root/wheel but the same effect: root-login everything great, another reseller-login I can see the source-code of the file :confused: I know that you can help me :)

    THANK YOU!
    strauberry

    cPanel.net Support Ticket Number:
     
  19. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Only if your woman. :D :D

    cPanel.net Support Ticket Number:
     
  20. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Okay try this, (we can undo it all after if doesn't work)

    In ssh as root.

    groupadd scripts
    vi /etc/group
    change
    scripts:x:32011: (number will be different)

    to
    scripts:x:32011:root,resellerid1,resellerid2

    Save file

    Now cd /usr/local/cpanel/whostmgr/docroot
    chown root:scripts filename
    chmod 755 filename

    Now try it.

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page