We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36604
    • 268 Posts
    Hi,

    I dont understand why as the new file is set to 644 and new folder to 755, when a component such Gallery or phpthumb acts and create a folder they are 705 and 604 for files.

    It's the same when doing it in ftp (Fire FTP) so I guess this a low level settings from the host ?

    Thank you
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Yes, on the server each user can be assigned a set of permissions for files he creates, and there can also be global settings. A badly configured server can be a real problem.
        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
        • 36604
        • 268 Posts
        doing this such creation from a shh console (new folder or files) gives 755 and 644.

        So...
        why Gallery and phpthumbs used through Gallery calls creates 604 files and 705 D ...???
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Depending on your server's configuration, if the .php is running as the web server user (apache, www, nobody are common web server users) then files created by that user may be given different permissions.

          Each user has a default set of permissions which apply to all files created by that user, unless the software explicitly sets something else. This is often called the 'umask', after the command used to change it. It is either inherited from the login process, or set in the .cshrc or .login file which configures an individual account, or it can be run manually.
            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