[Box Backup-dev] File permissions in bbackupd test

Chris Wilson boxbackup-dev at boxbackup.org
Mon Nov 24 22:02:17 GMT 2008


Hi James,

On Mon, 24 Nov 2008, James O'Gorman wrote:

> The automated build system has highlighted an interesting problem when running
> the bbackupd test suite as a non-root user.
> 
> 1) The directory debug/test/bbackupd/testfiles/restore1/x1/ is created with
> 0555 permissions.
> 2) The directory debug/test/bbackupd/testfiles/restore1/x1/cxfxcv/ is created
> with 0666 permissions.
> 
> The above means that until the directory has write/execute permissions applied
> to these directories, an ordinary user is not allowed to remove them, even if
> they own it - only root can remove such oddly-permissioned directories.
> 
> Are these permissions applied as part of a test? Can the permissions be
> changed before the end of the test so that the test ends cleanly?

They are set as part of the test. However they should be reset to 
something more sensible immediately after that test, around line 2146 of 
testbbackupd.cpp. If they aren't, perhaps it's because the test failed?

Does rm -rf debug/test/bbackupd/testfiles work to remove them as a normal 
user? Otherwise, you could chmod -R u+w debug/test/bbackupd/testfiles 
before removing them. If you're just going to rerun the test without 
deleting the testfiles manually, it should just work anyway.

Cheers, Chris.
-- 
_____ __     _
\  __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\ _/_/_/_//_/___/ | Stop nuclear war http://www.nuclearrisk.org |



More information about the Boxbackup-dev mailing list