Results 1 to 12 of 12
  1. #1

    how to secure /tmp folder-Permissions?

    How to secure /tmp folder on cpanel server with Centos?
    what is permissions?

  2. #2
    Join Date
    Apr 2009
    Posts
    865
    /scripts/securetmp should do the trick

  3. #3
    Join Date
    Apr 2005
    Posts
    1,767
    You may also want to ensure that this line is in your /etc/rc.local file:

    /scripts/securetmp --auto

  4. #4
    Join Date
    Mar 2009
    Location
    Chicago, IL
    Posts
    219
    Also don't forget /dev/shm.

    Just modify the line in your fstab that has the /dev/shm portion and replace 'defaults' with 'noexec,nosuid' then do a umount /dev/shm && mount /dev/shm

  5. #5
    Join Date
    Dec 2007
    Location
    Indiana, USA
    Posts
    19,196
    Quote Originally Posted by zacharooni View Post
    You may also want to ensure that this line is in your /etc/rc.local file:
    The script should add that automatically as long as you select yes to having it secured on boot.
    Michael Denney - MDDHosting.com - Proudly hosting more than 37,700 websites since 2007.
    Ultra-Fast Cloud Shared and Pay-By-Use Reseller Hosting Powered by LiteSpeed!
    cPanel • Free SSL • 100% Uptime SLA • 24/7 Support
    Class-leading support that responds in minutes, not days.

  6. #6
    Join Date
    Jun 2003
    Location
    World Wide Web
    Posts
    581
    /scripts/securetmp , will secure the /tmp partition for c-panel servers.


    Permission of /tmp will be as follows after executing the above script


    1) /tmp partition will be remounted as " noexec,nosuid "

    2 ) It will change /tmp to sticky bit directory ( chmod 1777 /tmp )
    SupportExpertz.com - the name says it all!
    Managed Cloud Servers
    Server Management and Monitoring
    24x7 outsourced customer support

  7. #7
    Join Date
    May 2009
    Location
    Utopia.
    Posts
    222
    That will work on dedicated servers, but it won't on VPS - I'm pretty sure about that, but please correct me if I'm wrong.


  8. #8
    Join Date
    May 2009
    Location
    US
    Posts
    2,503
    /scripts/securetmp - run that command via SSH to secure your /tmp folder.

  9. #9
    Join Date
    Jun 2003
    Location
    World Wide Web
    Posts
    581
    Hi shad0wz,

    In a vps you need to secure /tmp manualy

    You can do it by adding following entry in “/etc/fstab
    ====
    none /tmp tmpfs nodev,nosuid,noexec 0 0
    ====
    save the file and reboot the VPS, now vps get mounted with “nosuid” and “noexec”

    Also you can setup stickybit to /tmp
    SupportExpertz.com - the name says it all!
    Managed Cloud Servers
    Server Management and Monitoring
    24x7 outsourced customer support

  10. #10
    Join Date
    May 2009
    Location
    Utopia.
    Posts
    222
    Yeah, that's what I said - that script only works on dedicated servers Thanks for the tutorial though.


  11. #11
    Join Date
    Jun 2003
    Location
    World Wide Web
    Posts
    581
    Hi shad0wz,

    Np. Thank you for the update.
    SupportExpertz.com - the name says it all!
    Managed Cloud Servers
    Server Management and Monitoring
    24x7 outsourced customer support

  12. #12
    Hello,

    Thanks to all for help, Is there any way other than /scripts/securetmp, if I am not using cpanel server. I am newbie, so,curious. what will be commands and tricks other than /scripts/securetmp to secure tmp folder on dedicated server.

    Thanks guys, /scripts/securetmp is worked for me

Similar Threads

  1. IIS permissions/ folder permissions management
    By under_gravity in forum Hosting Software and Control Panels
    Replies: 9
    Last Post: 11-30-2007, 05:20 AM
  2. /tmp folder 777 ... use as sessions folder... secure?
    By marikas in forum Hosting Security and Technology
    Replies: 3
    Last Post: 08-14-2007, 05:27 AM
  3. folder permissions on a downloads folder
    By VideoJunky in forum Hosting Security and Technology
    Replies: 3
    Last Post: 04-05-2005, 05:10 PM
  4. Folder Permissions
    By Daemon1 in forum Hosting Security and Technology
    Replies: 12
    Last Post: 08-08-2004, 02:40 AM
  5. Folder permissions
    By diesel1 in forum Dedicated Server
    Replies: 1
    Last Post: 10-30-2002, 12:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •