Attachment Path Error - Help!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Patrick Melton
    Member
    • Jun 2005
    • 33
    • 3.0.7

    [Forum] Attachment Path Error - Help!

    I'm moving from a Windows virtual server to a Linux virtual server on 1&1.

    My old attachement path was c:/web/domaincom/forums/attachments

    I used PHP Info to determine the full path to my new website on the 1&1 virtual server.

    I go to Admin > Attachments > Attachment Storage Type and choose to move my attachments to a different directory. I then enter /var/www/vhosts/domain.com/httpdocs/forums/attachments as the new path, and hit Go.

    I get this error:

    We attempted to write a test file to /var/www/vhosts/domain.com/httpdocs/forums/attachments, but we were unsuccessful. Please verify that the web server has write/delete permissions for this path.

    FYI:

    The attachments directory and ALL directories below it have been chmod to 777 recursively.

    What gives? I need to get this working ASAP!
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    Check this first: How Do I Change the Location of Attachments After a Server Move
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment

    • Patrick Melton
      Member
      • Jun 2005
      • 33
      • 3.0.7

      #3
      It still gives the same error. I've checked and double checked the directory permissions. What am I missing?

      Comment

      • Steve Machol
        Former Customer Support Manager
        • Jul 2000
        • 154488

        #4
        Unfortunate then it would appear that this directory really is not world-readable and writable recursively. Assuming you have done everything else right, that is the only thing left.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment

        • Patrick Melton
          Member
          • Jun 2005
          • 33
          • 3.0.7

          #5
          The permissions and ownership is all correct. It is recursive. I don't know what else to check or do.

          Comment

          • Steve Machol
            Former Customer Support Manager
            • Jul 2000
            • 154488

            #6
            Enable phpinfo in the Admin CP, then provide the URL to your forums. This may help us troubleshoot this problem.

            Admin CP -> Settings -> Options -> Server Settings and Optimization Options -> Public phpinfo() Display Enabled
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment

            • Patrick Melton
              Member
              • Jun 2005
              • 33
              • 3.0.7

              #7
              OK it's enabled.

              Comment

              • Steve Machol
                Former Customer Support Manager
                • Jul 2000
                • 154488

                #8
                I see that you have open_basedir restrictions on your server and the path is set to this:

                /var/www/vhosts/nobodylikesonions.com/httpdocs


                Given that, the attachment directory should be: /var/www/vhosts/nobodylikesonions.com/httpdocs/forums/attachments

                If that is what you are using and you have chmod'd that directory recursively:

                chmod -R 777
                /var/www/vhosts/nobodylikesonions.com/httpdocs/forums/attachments

                ...then the next likely issue is the open_basedir restrictions themselves.

                To get uploads to work you need to create a 'tmp' subdirectory under your main hosting directory and chmod it to 777. Then in the Admin CP set "Upload In Safe Mode?"
                to 'Yes' and point the "Safe Mode Temp Directory" to that directory. If you placed the tmp directory in the right place, the path to the Safe Mode Temp Directory will be:

                /var/www/vhosts/nobodylikesonions.com/httpdocs/tmp

                Admin CP -> Settings -> Options -> Server Settings and Optimization Options -> Safe Mode Temporary Directory

                Admin CP -> Settings -> Options -> Server Settings and Optimization Options -> Safe Mode Upload Enabled -> Yes


                Also the php.ini setting for 'upload_tmp_dir' is empty. It's possible you (as root) or your host will need to edit php.ini and set 'upload_tmp_dir' to point to the full path to a directory on the server that is chmod'd
                to 1777. You will also need to restart Apache after making this change.
                Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                Change CKEditor Colors to Match Style (for 4.1.4 and above)

                Steve Machol Photography


                Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                Comment

                • Patrick Melton
                  Member
                  • Jun 2005
                  • 33
                  • 3.0.7

                  #9
                  What if I just turn Safe Mode off? Will that make it easier?

                  Comment

                  • Steve Machol
                    Former Customer Support Manager
                    • Jul 2000
                    • 154488

                    #10
                    No. The problem is open_basedir, not safe_mode.
                    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                    Change CKEditor Colors to Match Style (for 4.1.4 and above)

                    Steve Machol Photography


                    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                    Comment

                    • Patrick Melton
                      Member
                      • Jun 2005
                      • 33
                      • 3.0.7

                      #11
                      I use PHP for other domains on the server. Does this matter? Just curious if setting the php.ini upload_tmp_dir to directory under one domain's httpdocs folder is correct and will not affect other sites?

                      Comment

                      • Steve Machol
                        Former Customer Support Manager
                        • Jul 2000
                        • 154488

                        #12
                        I do not know how or if this will affect your other sites. I'm just trying to help you get this to work with vB.
                        Last edited by Steve Machol; Sat 16 Oct '10, 3:14pm.
                        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                        Change CKEditor Colors to Match Style (for 4.1.4 and above)

                        Steve Machol Photography


                        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                        Comment

                        • Patrick Melton
                          Member
                          • Jun 2005
                          • 33
                          • 3.0.7

                          #13
                          My basic question, I guess, is can the "safe mode temp directory" under the vB settings and the upload_tmp_directory in php.ini be two different directories? That way I can put the tmp directory in php.ini above all the website public folder roots.

                          It seems like safe mode requires a lot more of this stuff. It's not less complicated to just shut safe mode off? Are there any benefits of running it either way?

                          Comment

                          • Steve Machol
                            Former Customer Support Manager
                            • Jul 2000
                            • 154488

                            #14
                            Yes, they can and should be two sperate directories. The 'upload_tmp_dir' is generally something that is server-wide and requires root access to create.
                            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                            Change CKEditor Colors to Match Style (for 4.1.4 and above)

                            Steve Machol Photography


                            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                            Comment

                            • Patrick Melton
                              Member
                              • Jun 2005
                              • 33
                              • 3.0.7

                              #15
                              I did all this and it still isn't working.

                              I also want to mention that uploading of avatars, sig pics, etc. works fine - both before and after I did all this stuff.

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎