On Monday 28 December 2009 17:38:38 Martin Bligh wrote: > On Fri, Dec 18, 2009 at 1:54 PM, John Admanski <[email protected]> wrote: > > Remove the chmod+chown done by Host.send_file at the end of a copy. > > It's generally unnecessary, and often wrong because it often tries to > > chmod a lot more than the copied files. > > > > Risk: Medium > > Visibility: The dest given to Host.send_file will no longer be > > automatically made world-readable-executable. > > > > Signed-off-by: John Admanski <[email protected]> > > > > --- autotest/server/hosts/abstract_ssh.py 2009-12-18 > > 13:54:05.000000000 -0800 +++ autotest/server/hosts/abstract_ssh.py > > 2009-12-18 13:54:05.000000000 -0800 @@ -284,11 +284,6 @@ > > except error.CmdError, e: > > raise error.AutoservRunError(e.args[0], e.args[1]) > > > > - self.run('find "%s" -type d -print0 | xargs -0r chmod o+rx' % > > dest) - self.run('find "%s" -type f -print0 | xargs -0r chmod o+r' > > % dest) - if self.target_file_owner: > > - self.run('chown -R %s %s' % (self.target_file_owner, dest)) > > - > > > > def ssh_ping(self, timeout=60): > > try: > > I'm hitting a very similar problem here with writeable files, and am > also recalling why > we did this originally. > > Problem with writeable files: if you use scp, and we end up doing this > more than once, > it barfs when trying to write a read-only file the second time > (whether you use scp -p > or not, the file is created read-only on our end). Only real solution > I can think of right > now is to chmod all files and dirs o+w after copying them back, but I'm > worried about your other comments in here? > > Recalling why we did this originally: Some files at the other end are > created without > read permissions, and if we copy them back and leave them without, we can't > see them afterwards.
>From the web server you mean. I thought about these issues too but AFAIK what you're describing should happen if we disable the chmod after a get_file() (used when receiving files from the client to the server) not after the send_file() (used to send files from the server to the client, and this is what John's patch changes). Or maybe I missed a similar problem for send_file(). -- Mihai Rusu _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
