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.

/tmp/ writeable and chmod of /home/user/tmp/

Discussion in 'General Discussion' started by khorinis, Sep 10, 2010.

  1. khorinis

    khorinis Well-Known Member

    Joined:
    Aug 15, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Hello,
    which chmod does /home/*user*/tmp have normaly? It's the tmp folder of cpanel for every statistics.

    How could i make /tmp/ writeable for a user? I use suphp (tutorial "convert dso to suphp") and it should be writeable for my webscript because of plugin installation. Chmod must be 755 for folders and 644 for files.
     
    #1 khorinis, Sep 10, 2010
    Last edited: Sep 10, 2010
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    That directory should be set to 755. The directories in it as well, 755.

    I'm unclear as to what exactly you're hoping to do, but there you are.

    HTH!
     
  3. khorinis

    khorinis Well-Known Member

    Joined:
    Aug 15, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Hello,
    i have got /tmp/ to be writeable for my webscript with handler dso but now i'm using suphp with lower rights. What do i need to change for let my webscript can write and read in /tmp/ as it was when handler were dso?
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    If the server is running SuPHP then the suggested 755 above is what you seek.
     
  5. khorinis

    khorinis Well-Known Member

    Joined:
    Aug 15, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Webscript tell me a error that he can't read / create a file in the tmp folder. Folder have chmod 755 and is set as tmp directory.

    Error:
    package information file 'package.xml' not found in '/home/user/public_html/forum/tmp/package_fe12ae45253a308221193ab059de35210d8a78fc' (13000)

    Setting:
    Software is a Burning Board 3.
     
    #5 khorinis, Sep 10, 2010
    Last edited: Sep 10, 2010
  6. GaryT

    GaryT Well-Known Member

    Joined:
    May 19, 2010
    Messages:
    321
    Likes Received:
    3
    Trophy Points:
    16
    You said tmp as in server side not client side !

    If your using suPHP then, The tmp for this should be set to 644 suPHP changes it completly, I tend not to use suPHP as clients were constantly putting in support tickets saying the CHMOD 755 or 777 is not working blah blah and was always telling them about the apache and what rules and so on.. 98% of people who get hosting only know the 755 rules :eek:

    I currently use fastCGI - with a very hardend PHP, Yeah not as secure as suPHP but its alot more secure than the standard you get. Plus the performance is there too by using OPcode.

    Anyway, 644 should or will do the trick !
     
  7. khorinis

    khorinis Well-Known Member

    Joined:
    Aug 15, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    It's creating a file called "package_8f9af8731d9aeab410483ca35fa8dbfe4797c363" at the custom tmp folder but not the package.xml

    How i could fix that? Folder chmod tried 644 - still the same.

    Maybe someone could check it with me together?
     
    #7 khorinis, Sep 11, 2010
    Last edited: Sep 11, 2010
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You tend not to use it because why?

    If you are not using it, every time someone uploads something to say a Joomla site for example, thru their Joomla site, the file uploaded becomes owned by nobody. When they need to change something, you must go in and help.

    If using SuPHP and they need to change a directory from 777 to 755, they can do it themselves.

    98%? Can you provide a link to that poll?

    The performance hit by SuPHP is not as bad as you might think on todays very fast servers. To me, that very small hit is worth the price.


    No folder should be set to 644.

    Maybe you could check to be sure you're actually running SuPHP.

    In your WHM what does it say on this page for you?

    WHM > Service Configuration > Apache Configuration > PHP and SuExec Configuration > PHP 5 Handler
     
  9. khorinis

    khorinis Well-Known Member

    Joined:
    Aug 15, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    I'm using suphp, yes.
     
  10. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Great. OK, lets start over then.

    What is it exactly that you're trying to do that won't work? I've got a few minutes to spare. If you can explain more I'll try and reproduce it here on my end on my test server running SuPHP as you are.
     
  11. khorinis

    khorinis Well-Known Member

    Joined:
    Aug 15, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Last time i got /tmp writeable with handler dso and chmod 777 for the installation. But now i want to install a plugin for Burning Board 3 and when i enter the customer details it's going to install it but with the above told error. Only the package.xml can't get created in the tmp folder. If you want i can give you access to it for try it by yourself. It's the newest version of Burning Board 3 (3.1.3) and it's the plugin "Postingtemplate".
     
  12. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    That won't be needed. You could give those details to your host for assistance with this though.

    You have burning board installed ok then I take it? Is it the paid or the Lite version?

    What's the name of the plugin you're trying to install?
     
  13. khorinis

    khorinis Well-Known Member

    Joined:
    Aug 15, 2010
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Burning Board 3.1.3 - paid one.

    Plugin / Paket:
    PostingTemplate 1.3.1 pl 1 from Tobias Friebel

    I've got also root access - not only webspace.
     
    #13 khorinis, Sep 11, 2010
    Last edited: Sep 11, 2010
  14. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I won't be able to assist you with this one, sorry.

    If your plugin is anything like the installer (I'm assuming it is) for the burning board itself, it's coded to use $_SERVER['DOCUMENT_ROOT'

    Not any directory on the user account.

    Simply running this installer loads up the server tmp with all sorts of files needed to install this forum software.

    A snip from the install.php for burning board.

    Code:
    
    class BasicFileUtil {
    	/**
    	 * Tries to find the temp folder.
    	 * 
    	 * @return	string
    	 */
    	public static function getTempFolder() {
    		// use tmp folder in document root by default
    		if (!empty($_SERVER['DOCUMENT_ROOT'])) {
    			if (strpos($_SERVER['DOCUMENT_ROOT'], 'strato') !== false) {
    				// strato bugfix
    				// create tmp folder in document root automatically
    				if (!@file_exists($_SERVER['DOCUMENT_ROOT'].'/tmp')) { 
    					@mkdir($_SERVER['DOCUMENT_ROOT'].'/tmp/', 0777);
    					@chmod($_SERVER['DOCUMENT_ROOT'].'/tmp/', 0777);
    				}
    			}
    			if (@file_exists($_SERVER['DOCUMENT_ROOT'].'/tmp') && @is_writable($_SERVER['DOCUMENT_ROOT'].'/tmp')) {
    				return $_SERVER['DOCUMENT_ROOT'].'/tmp/';
    			}
    		}
    		
    		if (isset($_ENV['TMP']) && @is_writable($_ENV['TMP'])) {
    			return $_ENV['TMP'] . '/';
    		}
    		if (isset($_ENV['TEMP']) && @is_writable($_ENV['TEMP'])) {
    			return $_ENV['TEMP'] . '/';
    		}
    		if (isset($_ENV['TMPDIR']) && @is_writable($_ENV['TMPDIR'])) {
    			return $_ENV['TMPDIR'] . '/';
    		}
    
    The problem you're having is not a cPanel problem, its the software.

    You'll need to either contact your host, or burning bored support I would think you pay for with the paid version of this software, or the plugin developer for help on this one.

    You might also want to clean up your servers tmp directory. (cautiously, you can kill MySQL if you delete the sock file. And there may be other files or directories there you don't want to touch as well)

    I would not suggest this forum software to anyone, myself. I'm sorry.
     
Loading...

Share This Page