We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10696
    • 35 Posts
    Hello everybody!
    I'm uploading MODx setup files zipped in archive to my hosting.
    When I unzip files via hosting file manager all files have 777 (rwx-rwx-rwx) permissions.
    Is it normal?

    This question has been answered by Tyreal2012. See the first response.

      • 10378
      • 375 Posts
      I would say it's ok - maybe you could set it to 775 for folders and 664 for files - this should be enough.
        Freelancer @bitego http://www.bitego.com
        ---
        GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
        More infos here: http://www.bitego.com/extras/goodnews/
      • discuss.answer
        • 30912
        • 463 Posts
        No - its not normal, All of your folders should extract to 755 and files should extract to 644 - right out of the install - are you running any form of chmod when you are uploading?

        I've ran many installs and have never come accross this, both via pure ftp upload or SSH
          • 10696
          • 35 Posts
          Quote from: Tyreal2012 at Dec 04, 2012, 11:28 AM
          No - its not normal, All of your folders should extract to 755 and files should extract to 644 - right out of the install - are you running any form of chmod when you are uploading?

          I've ran many installs and have never come accross this, both via pure ftp upload or SSH

          No. I don't. Just upload and unzip files. Seems this relies on hosting configuration. I'll should contact support. Thank you!
            • 18373 ☆ A M B ☆
            • 3,141 Posts
            It depends on the host, but by default it's safer to assume 0755. If with 0755 you don't have access to the files from for instance the Manager, you can set it to 0777... or move hosts tongue

            It's a royal pain in the behind in my experience to manage a site that does not run phpsuexec or similar to let you use files normally from both FTP and PHP, without making it all world writable.
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 10378
              • 375 Posts
              Quote from: Tyreal2012 at Dec 04, 2012, 11:28 AM
              No - its not normal, All of your folders should extract to 755 and files should extract to 644 - right out of the install - are you running any form of chmod when you are uploading?

              There is no "normal" behavior - it simply depends on host (FTP/Apache) settings.
                Freelancer @bitego http://www.bitego.com
                ---
                GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
                More infos here: http://www.bitego.com/extras/goodnews/
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                It can also depend on the settings of your FTP client. For example, I've attached a screenshot of the Cyberduck Preferences -> Transfers -> Permissions window. You can change the permissions on download or on upload here.

                On installation, MODx has a form for setting the preferred permissions for its own file handling. I've never been able to find how to change this after installation, though.

                In some cases, when a server extracts an archive it will change all files and folders to match that of the uploaded archive file, or to keep the permissions they had when they were archived. Or, in some cases, a server will change file permissions to what it wants, no matter what you may do. All that depends on the server configuration.

                The wrong permission settings can do anything from 404 not found errors, to 403 forbidden/permission denied errors to 500 server errors or 503 service unavailable errors. I've seen all of these and a few more unexpected and unexplained errors.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 30912
                  • 463 Posts
                  Quote from: gadgetto at Dec 05, 2012, 01:34 AM
                  Quote from: Tyreal2012 at Dec 04, 2012, 11:28 AM
                  No - its not normal, All of your folders should extract to 755 and files should extract to 644 - right out of the install - are you running any form of chmod when you are uploading?

                  There is no "normal" behavior - it simply depends on host (FTP/Apache) settings.

                  Good job i'm not normal then wink
                    • 10378
                    • 375 Posts
                    Quote from: sottwell at Dec 05, 2012, 02:00 AM
                    On installation, MODx has a form for setting the preferred permissions for its own file handling. I've never been able to find how to change this after installation, though.

                    Hi Susan,

                    System Settings -> File System - new_file_permissions and new_folder_permissions

                    Greetings,
                    Martin
                      Freelancer @bitego http://www.bitego.com
                      ---
                      GoodNews - one of the most advanced and integrated Group Mailer premium add-ons for MODX Revolution!
                      More infos here: http://www.bitego.com/extras/goodnews/
                      • 10696
                      • 35 Posts
                      Quote from: sottwell at Dec 05, 2012, 02:00 AM
                      It can also depend on the settings of your FTP client. For example, I've attached a screenshot of the Cyberduck Preferences -> Transfers -> Permissions window. You can change the permissions on download or on upload here.

                      On installation, MODx has a form for setting the preferred permissions for its own file handling. I've never been able to find how to change this after installation, though.

                      In some cases, when a server extracts an archive it will change all files and folders to match that of the uploaded archive file, or to keep the permissions they had when they were archived. Or, in some cases, a server will change file permissions to what it wants, no matter what you may do. All that depends on the server configuration.

                      The wrong permission settings can do anything from 404 not found errors, to 403 forbidden/permission denied errors to 500 server errors or 503 service unavailable errors. I've seen all of these and a few more unexpected and unexplained errors.

                      I didn't hear about CyberDuck. Looks like it is very helpful. Is it OpenSource or freeware?


                      Quote from: gadgetto at Dec 05, 2012, 02:24 AM
                      System Settings -> File System - new_file_permissions and new_folder_permissions
                      I've also found on web that it is possible to change new file and folder permissions via System Settings. But in fact there is no such options in my MODx (2.2.5-pl)
                      Reffering to MODx dashboard it is also possible to change that options programmaticaly, but I've never tested it.
                      Also it is possible to run MODx Setup with advanced reinstall options and change file and folder permissions there.