File permissions after FTP push

Vincent Ladeuil v.ladeuil+lp at free.fr
Tue Mar 3 16:22:12 GMT 2009


>>>>> "LZ" == Lukas Zapletal <lukas91 at zapletalovi.com> writes:

    >> Ok, things has evolved a bit since the last time I checked the
    >> code.
    >> 
    >> It appears that we start by getting the chmod bits from the base
    >> dir, so roughly: ftp://xxxxx@yyyyy.com/repub/bzr/tox264 or
    >> ftp://xxxxx@yyyyy.com/repub/bzr, depending on whether you first
    >> ask for tox264 creation or not.
    >> 
    >> The idea is to respect whatever mode bits has been set there
    >> (including writable by group, etc) but not the sticky bits
    >> though.
    >> 
    >> Relevant code is bzrlib.BzrDir.bzrdir._find_creation_modes.
    >> 
    >> So, you should first set the right chmod bits *on the server* for
    >> your directory (delete the existing one or do a chmod -R).

    LZ> On the server, right? I thought it will respecting the
    LZ> local permissions.

The local site and the remote one can define different users or
different groups or different policies, respecting the remote
policy sounds the more sensible approach.

Your ftp server forbids anonymous users to read the files you
upload by default, you chose a different approach, fine, but
under different contexts replicating the local permissions to the
remote site may not make sense or even be dangerous.

    LZ> Ok - so if I understand correctly I need to:

    LZ> - delete the repo from FTP
    LZ> - create directory there (like /repub/bzr/myproject)
    LZ> - set permissions on that directory (lets say 777)
    LZ> - push to that location forcing not creating new directory
    LZ> - all files in the repo should be readable for all users (777)

    >> Can you try again and let me know how it works ?

    LZ> Sure. I have used chmod -R approach and its ok now.

    LZ> After new commit the permissions of the .pack file is also OK.

Good.

    LZ> Great - thanks a lot. This should be documented somewhere...

That's right. Where would you have searched it for ?

I'd say it's related to the ftp server administration because
sftp/bzr+shh have there own problems and solutions, http+webdav
is yet another totally different beast...

I'm not sure we even some existing documentation for that kind of
problems...

        Vincent




More information about the bazaar mailing list