Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Setting the Correct File Owner

    LAMP
    5
    10
    304
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • humptydumpty
      humptydumpty last edited by

      The doc page says that for Apache+PHP apps, permissions should be "www-data.www-data". Is that a typo? If not, how do I make the change?

      What should the owner be for:

      • folders
      • subfolders
      • files
      • htaccess
      • index.php

      Thanks!

      murgero micmc 2 Replies Last reply Reply Quote 1
      • murgero
        murgero App Dev @humptydumpty last edited by murgero

        @humptydumpty chown -R www-data:www-data /app/data/public will make the whole public folder owned by apache.

        Change /app/data/public to a file or folder of choice.

        --
        https://urgero.org
        ~ Professional Nerd. Freelance Programmer. ~
        Matrix: @murgero:urgero.org

        1 Reply Last reply Reply Quote 1
        • micmc
          micmc @humptydumpty last edited by

          @humptydumpty said in Setting the Correct File Owner:

          "www-data.www-data". Is that a typo?

          A typo with the separator which should be : and not a . as in

          www-data:www-data
          

          @murgero has provided the right command here above.


          https://marketingtechnology.agency
          For cutting edge web technologies

          1 Reply Last reply Reply Quote 1
          • nebulon
            nebulon Staff last edited by

            Thanks for letting us know about that typo. I have fixed it now in the docs.

            humptydumpty 1 Reply Last reply Reply Quote 2
            • humptydumpty
              humptydumpty @nebulon last edited by

              @nebulon @micmc @murgero Thanks guys. I'm used to cPanel and setting file permissions with chmod but don't know what those numbers translate to in Cloudron. So www-data for all public facing files and folders is ok?

              nebulon micmc 2 Replies Last reply Reply Quote 0
              • nebulon
                nebulon Staff @humptydumpty last edited by

                @humptydumpty yes that is correct

                1 Reply Last reply Reply Quote 1
                • micmc
                  micmc @humptydumpty last edited by

                  @humptydumpty said in Setting the Correct File Owner:

                  Thanks guys. I'm used to cPanel

                  Now welcome to HIGH-CLASS simplified servers operations, through Cloudron web administrators' secret society 😛


                  https://marketingtechnology.agency
                  For cutting edge web technologies

                  murgero 1 Reply Last reply Reply Quote 3
                  • murgero
                    murgero App Dev @micmc last edited by

                    @micmc chanting one of us! one of us!

                    --
                    https://urgero.org
                    ~ Professional Nerd. Freelance Programmer. ~
                    Matrix: @murgero:urgero.org

                    1 Reply Last reply Reply Quote 3
                    • girish
                      girish Staff last edited by

                      FWIW, '.' or ':' works as separator between user and group in chown. Though ':' is recommended nowadays since it allows a '.' in the username.

                      micmc 1 Reply Last reply Reply Quote 3
                      • micmc
                        micmc @girish last edited by

                        @girish Useful info mate! 🙂


                        https://marketingtechnology.agency
                        For cutting edge web technologies

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Powered by NodeBB