I would like to change all of my directories from public_html on down to being owned and grouped by "". If that is not possible, then "nobody". Because as it is now, I have to ftp_site permissions on my dirs to write to them and that means loggin in, which probably slows things down.

I'm posting here because I'm not sure the practice is safe.

    Now that I started trying to do it, I'm finding that this does not work at all:
    ftp_site($conn, "CHOWN nobody ".MakeFtpPath($pth));

    CHOWN does not seem to be a valid command. Is it? Am I trying something that isn't possible?

      Hi Aewarnick

      I think it depends on which commands your FTP server allows.

      In any case, you can only change ownership to a user which already exists. The CHOWN command doesn't create users on the fly. Create the new user first and then change ownership. The correct syntax is:

      chown newowner filename

      HTH

      Norm

        Isn't 'nobody' a user? php script uses that name.

          5 days later

          The question is whether 'nobody' is a registered user on the system which runs the FTP server. I suspect the answer is no. As far as a computer is concerned, "nobody" is a name. FTP servers can be configured to allow anonymous users, but then their name is an empty string.

          I'm a bit confused as to what you're actually trying to do. Whatever - you can't run <chown nobody> until a user called "nobody" exists.

          Norm

            Write a Reply...