2 Replies Latest reply on Aug 28, 2006 2:42 PM by Newsgroup_User

    OT-struggling with file permissions

    Level 7
      I have implemented a CMS that does not use a database, and therefore I rely on changing some File
      permissions using the PHP function chmod() in order for the CMS to work.
      I have had no problem doing this on some servers, but on this one, it's becoming a real headacke.

      I have observed that when I upload files to the site using FTP, and when I create a file using the
      CMS, the file's permissions that result by default are completely different.
      I sometimes can use the PHP chmod() function on them, sometimes it's not permitted, it seems arbitrary.

      So I've tried to solve this using "Transmit", which can change remote file premissions. And I have
      discovered something new which baffles me:

      Transmit show me the file permissions, i.e. 666 or 777 or whatever. But it also shows me the 'owner'
      and 'group' numbers, something like
      51742 or 50278 or 33... When it's 33, I can't change the file permission via Transmit, but I can
      using my CMS! Anyways all sorts of oddities happen.

      I have no idea what these numbers mean, and I suspect that if I could understand that I could start
      to look for a real solution to my file permission problems.

      anybody has an idea, or a reference where the meaning of these numbers can be explained?

      --
      seb ( ---@webtrans1.com)
      http://webtrans1.com | high-end web design
      Downloads: Slide Show, Directory Browser, Mailing List
        • 1. Re: OT-struggling with file permissions
          Level 7
          You can see the same info in dw's FTP log when you do a directory list.

          my guess is that php is a different User. Files it creates are not owned by
          you.

          Likewise, the files you do own- the script can't change permissions on
          because it doesn't own them.

          > Transmit show me the file permissions, i.e. 666 or 777 or whatever. But it
          > also shows me the 'owner'
          > and 'group' numbers, something like
          > 51742 or 50278 or 33... When it's 33, I can't change the file permission via
          > Transmit, but I can
          > using my CMS! Anyways all sorts of oddities happen.

          • 2. Re: OT-struggling with file permissions
            Level 7
            Alan wrote:
            > You can see the same info in dw's FTP log when you do a directory list.
            >
            > my guess is that php is a different User. Files it creates are not owned by
            > you.
            >
            > Likewise, the files you do own- the script can't change permissions on
            > because it doesn't own them.
            >
            >
            >>Transmit show me the file permissions, i.e. 666 or 777 or whatever. But it
            >>also shows me the 'owner'
            >>and 'group' numbers, something like
            >>51742 or 50278 or 33... When it's 33, I can't change the file permission via
            >>Transmit, but I can
            >>using my CMS! Anyways all sorts of oddities happen.
            >
            >

            I know that much, and i know that's what the problem is. That's why i assume that if I knew what
            these numbers mean (and I can change them), I'll really be on top of it.

            --
            seb ( ---@webtrans1.com)
            http://webtrans1.com | high-end web design
            Downloads: Slide Show, Directory Browser, Mailing List