Hi Stefan,

Thanks for looking into this, I appreciate it.

On Tue, 2011-08-23 at 11:02 +0200, Stefan Sperling wrote:
> On Mon, Aug 22, 2011 at 04:57:37PM -0600, Kevin Locke wrote:
>> [...]
>> 
>> = The Problem =
>> I am unable to work with (checkout/update) a working copy on an NTFS
>> filesystem mounted using NTFS-3G unless it is mounted with uid=me,
>> even when full read/write permissions (fmask=111,dmask=000) are
>> granted.  The results are as follows:
>> 
>> $ svn co http://svn.apache.org/repos/asf/subversion/trunk testdir
>> svn: E000001: Can't set permissions on '<path>/testdir/.svn/tmp/svn-HZAmRw': 
>> Operation not permitted
>> 
>> I first encountered this behavior with the version in Debian testing
>> (1.6.17dfsg-1) and I have just confirmed the same behavior is present
>> in trunk.
>> 
>> [...]
> 
> [...]
> 
> It is safe to ignore the error you are getting, for two reasons:
> 
>  - Subversion is trying to expand the set of permissions, not shrink it
> 
>  - The temporary file is created within the working copy, not a system
>    temp dir. So the temp file perms do not really matter a whole lot.
>    If the working copy contains sensitive data we can assume the user
>    has made the entire tree unreadable to other users to avoid leaking
>    data in the first place via working files.
> 
> However, I doubt very much that ignoring just this one error will
> give you a usable working copy. Many svn operations attempt to create
> temporary files within the working copy, and fixing all of them might
> be a bit of work. Ignoring any such errors has to be done carefully
> because svn should not ever leak data within temporary files it creates
> outside of the working copy, especially when using a system temp dir.

Very true.  I wonder if it might make sense to do a test at startup to
see if permissions are supported in the working directory and ignore
all permissions errors in the working directory iff the filesystem
would not preserve them anyway.

I also recognize that this is not a common usage scenario (I just
encountered it after using subversion for a long time), and I am not
highly inconvenienced by it.  So if it warrants a bug in the tracker
with low priority, I would not be offended.

> It would nevertheless be interesting to see how far this patch gets you.
> 
> [...]

It did get me further.  The results were as follows:

$ svn co http://svn.apache.org/repos/asf/subversion/trunk testdir
A    /testdir/get-deps.sh
A    /testdir/NOTICE
A    /testdir/LICENSE
A    /testdir/Makefile.in
A    /testdir/build.conf
A    /testdir/win-tests.py
A    /testdir/COMMITTERS
A    /testdir/notes
A    /testdir/notes/svnsync.txt
A    /testdir/notes/commit-access-templates
A    /testdir/notes/commit-access-templates/pmc-member.tmpl
A    /testdir/notes/commit-access-templates/partial-committer.tmpl
A    /testdir/notes/commit-access-templates/contrib-committer.tmpl
A    /testdir/notes/commit-access-templates/full-committer.tmpl
svn: E000001: Can't set permissions on '/testdir/svn-o4bEud'
svn: E000001: Can't set permissions on '/testdir/svn-o4bEud': Operation not 
permitted

The backtraces to the two errors are attached.

-- 
Cheers,      |  ke...@kevinlocke.name   | JIM:  kevin...@jabber.org
Kevin        |  http://kevinlocke.name  | IRC: kevinoid on freenode
#0  file_perms_set (
    src=0xb73f9060 "/foo/bar/svn-ue89Yx", 
    dst=0xb73fb060 "/foo/bar/svn-UgD9LD", 
    pool=0xb73f4018) at subversion/libsvn_subr/io.c:846
#1  svn_io_copy_perms (
    src=0xb73f9060 "/foo/bar/svn-ue89Yx", 
    dst=0xb73fb060 "/foo/bar/svn-UgD9LD", 
    pool=0xb73f4018) at subversion/libsvn_subr/io.c:900
#2  0xb7e91341 in svn_io_copy_file (
    src=0xb73f9060 "/foo/bar/svn-ue89Yx", 
    dst=0xb73f4148 "/foo/bar/get-deps.sh", 
    copy_perms=1, pool=0xb73f4018) at subversion/libsvn_subr/io.c:828
#3  0xb7e91d1a in reown_file (
    path=0xb73f4148 "/foo/bar/get-deps.sh", 
    change_readwrite=0, enable_write=0, change_executable=1, executable=1, 
    ignore_enoent=0, pool=0xb73f4018) at subversion/libsvn_subr/io.c:1328
#4  io_set_file_perms (
    path=0xb73f4148 "/foo/bar/get-deps.sh", 
    change_readwrite=0, enable_write=0, change_executable=1, executable=1, 
    ignore_enoent=0, pool=0xb73f4018) at subversion/libsvn_subr/io.c:1509
#5  0xb7e91e9b in svn_io_set_file_executable (
    path=0xb73f4148 "/foo/bar/get-deps.sh", 
    executable=1, ignore_enoent=0, pool=0xb73f4018)
    at subversion/libsvn_subr/io.c:1754
#6  0xb7f375cc in svn_wc__sync_flags_with_props (did_set=0x0, db=0xb7e5c838, 
    local_abspath=0xb73f4148 "/foo/bar/get-deps.sh", scratch_pool=0xb73f4018) 
at subversion/libsvn_wc/translate.c:436
#7  0xb7f66e9b in run_file_install (db=0xb7e5c838, work_item=0xb73f4100, 
    wri_abspath=0xb73f6128 "/foo/bar/notes/commit-access-templates", 
cancel_func=0x8055960 <svn_cl__check_cancel>, 
    cancel_baton=0x0, scratch_pool=0xb73f4018)
    at subversion/libsvn_wc/workqueue.c:772
#8  0xb7f681e1 in dispatch_work_item (db=0xb7e5c838, 
    wri_abspath=0xb73f6128 "/foo/bar/notes/commit-access-templates", 
cancel_func=0x8055960 <svn_cl__check_cancel>, 
    cancel_baton=0x0, scratch_pool=0xb73f6018)
    at subversion/libsvn_wc/workqueue.c:1484
#9  svn_wc__wq_run (db=0xb7e5c838, 
    wri_abspath=0xb73f6128 "/foo/bar/notes/commit-access-templates", 
cancel_func=0x8055960 <svn_cl__check_cancel>, 
    cancel_baton=0x0, scratch_pool=0xb73f6018)
    at subversion/libsvn_wc/workqueue.c:1567
#10 0xb7f3c7f6 in close_directory (dir_baton=0xb73f6058, pool=0xb7411018)
    at subversion/libsvn_wc/update_editor.c:2818
#11 0xb7edb2fd in close_directory (dir_baton=0xb7411090, pool=0xb7411018)
    at subversion/libsvn_delta/cancel.c:261
#12 0xb7be81c0 in end_element (userdata=0xb742fd58, state=224, 
    nspace=0x8084d20 "svn:", elt_name=0x80b1e20 "add-directory")
    at subversion/libsvn_ra_neon/fetch.c:2026
#13 0xb7bf7900 in wrapper_endelm_cb (baton=0xb74220d8, state=224, 
    nspace=0x8084d20 "svn:", name=0x80b1e20 "add-directory")
    at subversion/libsvn_ra_neon/util.c:1135
#14 0xb7ddff09 in ?? () from /usr/lib/libneon-gnutls.so.27
#15 0xb77a2fda in ?? () from /usr/lib/libxml2.so.2
#16 0xb77aa5f8 in ?? () from /usr/lib/libxml2.so.2
#17 0xb77ab405 in xmlParseChunk () from /usr/lib/libxml2.so.2
#18 0xb7de069c in ne_xml_parse () from /usr/lib/libneon-gnutls.so.27
#19 0xb7de07ab in ne_xml_parse_v () from /usr/lib/libneon-gnutls.so.27
#20 0xb7bf78ab in cancellation_callback (userdata=0xb7425768, 
    block=0x80bfba0 
"TTsh3fgorghc5AKSbGO2WLiDYZIjr3dZ9hIRRIEKUxtEZMIKf3la37sEZiLKoqIG\nU0mq+SmJxCEi8D6nedX6ytRjmfV7hbjDocKyIN2OcxoaoxswHz1FyXtNaMGYKSbwOnUHB9Tj1TEW\nPM9wmhMK3p+v0BFsUSemTEDncV46TuBzMjlmN6i1E3zIaWsgylxhv13JHh"...,
 len=5661)
    at subversion/libsvn_ra_neon/util.c:1241
#21 0xb7dde371 in ?? () from /usr/lib/libneon-gnutls.so.27
#22 0xb7dd183f in ne_read_response_block () from /usr/lib/libneon-gnutls.so.27
#23 0xb7dd1c3c in ne_discard_response () from /usr/lib/libneon-gnutls.so.27
#24 0xb7dd1c81 in ne_request_dispatch () from /usr/lib/libneon-gnutls.so.27
#25 0xb7bf8f1b in svn_ra_neon__request_dispatch (code_p=0x0, req=0xb7422058, 
    extra_headers=0xb74255f8, body=<value optimized out>, okay_1=200, 
    okay_2=0, pool=0xb7434018) at subversion/libsvn_ra_neon/util.c:1534
#26 0xb7bf98c7 in parsed_request (sess=0xb742c100, 
    method=<value optimized out>, 
    url=0xb742c5e8 "/repos/asf/!svn/vcc/default", body=0x0, 
    body_file=0xb742ff68, set_parser=0, 
    startelm_cb=0xb7be890b <start_element>, 
    cdata_cb=0xb7be8749 <cdata_handler>, endelm_cb=0xb7be803a <end_element>, 
    baton=0xb742fd58, extra_headers=0xb74255f8, status_code=0x0, 
    spool_response=0, pool=0xb7434018) at subversion/libsvn_ra_neon/util.c:1320
#27 svn_ra_neon__parsed_request (sess=0xb742c100, 
    method=<value optimized out>, 
    url=0xb742c5e8 "/repos/asf/!svn/vcc/default", body=0x0, 
    body_file=0xb742ff68, set_parser=0, 
    startelm_cb=0xb7be890b <start_element>, 
    cdata_cb=0xb7be8749 <cdata_handler>, endelm_cb=0xb7be803a <end_element>, 
    baton=0xb742fd58, extra_headers=0xb74255f8, status_code=0x0, 
    spool_response=0, pool=0xb7434018) at subversion/libsvn_ra_neon/util.c:1373
#28 0xb7be7574 in reporter_finish_report (report_baton=0xb742fd58, 
    pool=0xb7434018) at subversion/libsvn_ra_neon/fetch.c:2413
#29 0xb7f02309 in svn_wc_crawl_revisions5 (wc_ctx=0xb7e5c828, 
    local_abspath=0xb7434158 "/foo/bar", 
    reporter=0xb7c00078, report_baton=0xb742fd58, restore_files=1, 
    depth=svn_depth_unknown, honor_depth_exclude=1, 
    depth_compatibility_trick=0, use_commit_times=0, 
    cancel_func=0x8055960 <svn_cl__check_cancel>, cancel_baton=0x0, 
    notify_func=0x8059910 <notify>, notify_baton=0xb7437178, 
    scratch_pool=0xb7434018) at subversion/libsvn_wc/adm_crawler.c:861
#30 0xb7fd3506 in update_internal (result_rev=0x0, 
    local_abspath=0xb7434158 "/foo/bar", 
    anchor_abspath=0xb742e708 "/foo/bar", 
    revision=0xbfffeb40, depth=svn_depth_unknown, depth_is_sticky=0, 
    ignore_externals=0, allow_unver_obstructions=0, adds_as_modification=1, 
    timestamp_sleep=0xbfffebec, notify_summary=1, ctx=0xb7e5c7c8, 
    pool=0xb7434018) at subversion/libsvn_client/update.c:399
#31 0xb7fd3bae in svn_client__update_internal (result_rev=0x0, 
    local_abspath=0xb7434158 "/foo/bar", 
    revision=0xbfffecac, depth=svn_depth_unknown, depth_is_sticky=1, 
    ignore_externals=0, allow_unver_obstructions=0, adds_as_modification=1, 
    make_parents=0, innerupdate=0, timestamp_sleep=0xbfffebec, ctx=0xb7e5c7c8, 
    pool=0xb7434018) at subversion/libsvn_client/update.c:541
#32 0xb7f96223 in svn_client__checkout_internal (result_rev=0x0, 
    url=0xb7437980 "http://svn.apache.org/repos/asf/subversion/trunk";, 
    local_abspath=0xb7434158 "/foo/bar", 
    peg_revision=0xbfffecb8, revision=0xbfffecac, ra_cache=0x0, 
    depth=svn_depth_unknown, ignore_externals=0, allow_unver_obstructions=0, 
    timestamp_sleep=0x0, ctx=0xb7e5c7c8, pool=0xb7434018)
    at subversion/libsvn_client/checkout.c:215
#33 0xb7f96385 in svn_client_checkout3 (result_rev=0x0, 
    URL=0xb7437980 "http://svn.apache.org/repos/asf/subversion/trunk";, 
    path=0xb7437b28 "/foo/bar", 
    peg_revision=0xbfffecb8, revision=0xbfffecac, depth=svn_depth_unknown, 
    ignore_externals=0, allow_unver_obstructions=0, ctx=0xb7e5c7c8, 
    pool=0xb7434018) at subversion/libsvn_client/checkout.c:255
#34 0x0804e36e in svn_cl__checkout (os=0xb7e5c1c0, baton=0xbfffedc4, 
    pool=0xb7e5c018) at subversion/svn/checkout-cmd.c:161
#35 0x080584f8 in main (argc=4, argv=0xbfffefe4) at subversion/svn/main.c:2587
#0  svn_io_copy_perms (
    src=0xb73f9060 "/foo/bar/svn-ue89Yx", 
    dst=0xb73fb060 "/foo/bar/svn-UgD9LD", 
    pool=0xb73f4018) at subversion/libsvn_subr/io.c:914
#1  0xb7e91341 in svn_io_copy_file (
    src=0xb73f9060 "/foo/bar/svn-ue89Yx", 
    dst=0xb73f4148 "/foo/bar/get-deps.sh", 
    copy_perms=1, pool=0xb73f4018) at subversion/libsvn_subr/io.c:828
#2  0xb7e91d1a in reown_file (
    path=0xb73f4148 "/foo/bar/get-deps.sh", 
    change_readwrite=0, enable_write=0, change_executable=1, executable=1, 
    ignore_enoent=0, pool=0xb73f4018) at subversion/libsvn_subr/io.c:1328
#3  io_set_file_perms (
    path=0xb73f4148 "/foo/bar/get-deps.sh", 
    change_readwrite=0, enable_write=0, change_executable=1, executable=1, 
    ignore_enoent=0, pool=0xb73f4018) at subversion/libsvn_subr/io.c:1509
#4  0xb7e91e9b in svn_io_set_file_executable (
    path=0xb73f4148 "/foo/bar/get-deps.sh", 
    executable=1, ignore_enoent=0, pool=0xb73f4018)
    at subversion/libsvn_subr/io.c:1754
#5  0xb7f375cc in svn_wc__sync_flags_with_props (did_set=0x0, db=0xb7e5c838, 
    local_abspath=0xb73f4148 "/foo/bar/get-deps.sh", scratch_pool=0xb73f4018) 
at subversion/libsvn_wc/translate.c:436
#6  0xb7f66e9b in run_file_install (db=0xb7e5c838, work_item=0xb73f4100, 
    wri_abspath=0xb73f6128 "/foo/bar/notes/commit-access-templates", 
cancel_func=0x8055960 <svn_cl__check_cancel>, 
    cancel_baton=0x0, scratch_pool=0xb73f4018)
    at subversion/libsvn_wc/workqueue.c:772
#7  0xb7f681e1 in dispatch_work_item (db=0xb7e5c838, 
    wri_abspath=0xb73f6128 "/foo/bar/notes/commit-access-templates", 
cancel_func=0x8055960 <svn_cl__check_cancel>, 
    cancel_baton=0x0, scratch_pool=0xb73f6018)
    at subversion/libsvn_wc/workqueue.c:1484
#8  svn_wc__wq_run (db=0xb7e5c838, 
    wri_abspath=0xb73f6128 "/foo/bar/notes/commit-access-templates", 
cancel_func=0x8055960 <svn_cl__check_cancel>, 
    cancel_baton=0x0, scratch_pool=0xb73f6018)
    at subversion/libsvn_wc/workqueue.c:1567
#9  0xb7f3c7f6 in close_directory (dir_baton=0xb73f6058, pool=0xb7411018)
    at subversion/libsvn_wc/update_editor.c:2818
#10 0xb7edb2fd in close_directory (dir_baton=0xb7411090, pool=0xb7411018)
    at subversion/libsvn_delta/cancel.c:261
#11 0xb7be81c0 in end_element (userdata=0xb742fd58, state=224, 
    nspace=0x8084d20 "svn:", elt_name=0x80b1e20 "add-directory")
    at subversion/libsvn_ra_neon/fetch.c:2026
#12 0xb7bf7900 in wrapper_endelm_cb (baton=0xb74220d8, state=224, 
    nspace=0x8084d20 "svn:", name=0x80b1e20 "add-directory")
    at subversion/libsvn_ra_neon/util.c:1135
#13 0xb7ddff09 in ?? () from /usr/lib/libneon-gnutls.so.27
#14 0xb77a2fda in ?? () from /usr/lib/libxml2.so.2
#15 0xb77aa5f8 in ?? () from /usr/lib/libxml2.so.2
#16 0xb77ab405 in xmlParseChunk () from /usr/lib/libxml2.so.2
#17 0xb7de069c in ne_xml_parse () from /usr/lib/libneon-gnutls.so.27
#18 0xb7de07ab in ne_xml_parse_v () from /usr/lib/libneon-gnutls.so.27
#19 0xb7bf78ab in cancellation_callback (userdata=0xb7425768, 
    block=0x80bfba0 
"TTsh3fgorghc5AKSbGO2WLiDYZIjr3dZ9hIRRIEKUxtEZMIKf3la37sEZiLKoqIG\nU0mq+SmJxCEi8D6nedX6ytRjmfV7hbjDocKyIN2OcxoaoxswHz1FyXtNaMGYKSbwOnUHB9Tj1TEW\nPM9wmhMK3p+v0BFsUSemTEDncV46TuBzMjlmN6i1E3zIaWsgylxhv13JHh"...,
 len=5661)
    at subversion/libsvn_ra_neon/util.c:1241
#20 0xb7dde371 in ?? () from /usr/lib/libneon-gnutls.so.27
#21 0xb7dd183f in ne_read_response_block () from /usr/lib/libneon-gnutls.so.27
#22 0xb7dd1c3c in ne_discard_response () from /usr/lib/libneon-gnutls.so.27
#23 0xb7dd1c81 in ne_request_dispatch () from /usr/lib/libneon-gnutls.so.27
#24 0xb7bf8f1b in svn_ra_neon__request_dispatch (code_p=0x0, req=0xb7422058, 
    extra_headers=0xb74255f8, body=<value optimized out>, okay_1=200, 
    okay_2=0, pool=0xb7434018) at subversion/libsvn_ra_neon/util.c:1534
#25 0xb7bf98c7 in parsed_request (sess=0xb742c100, 
    method=<value optimized out>, 
    url=0xb742c5e8 "/repos/asf/!svn/vcc/default", body=0x0, 
    body_file=0xb742ff68, set_parser=0, 
    startelm_cb=0xb7be890b <start_element>, 
    cdata_cb=0xb7be8749 <cdata_handler>, endelm_cb=0xb7be803a <end_element>, 
    baton=0xb742fd58, extra_headers=0xb74255f8, status_code=0x0, 
    spool_response=0, pool=0xb7434018) at subversion/libsvn_ra_neon/util.c:1320
#26 svn_ra_neon__parsed_request (sess=0xb742c100, 
    method=<value optimized out>, 
    url=0xb742c5e8 "/repos/asf/!svn/vcc/default", body=0x0, 
    body_file=0xb742ff68, set_parser=0, 
    startelm_cb=0xb7be890b <start_element>, 
    cdata_cb=0xb7be8749 <cdata_handler>, endelm_cb=0xb7be803a <end_element>, 
    baton=0xb742fd58, extra_headers=0xb74255f8, status_code=0x0, 
    spool_response=0, pool=0xb7434018) at subversion/libsvn_ra_neon/util.c:1373
#27 0xb7be7574 in reporter_finish_report (report_baton=0xb742fd58, 
    pool=0xb7434018) at subversion/libsvn_ra_neon/fetch.c:2413
#28 0xb7f02309 in svn_wc_crawl_revisions5 (wc_ctx=0xb7e5c828, 
    local_abspath=0xb7434158 "/foo/bar", 
    reporter=0xb7c00078, report_baton=0xb742fd58, restore_files=1, 
    depth=svn_depth_unknown, honor_depth_exclude=1, 
    depth_compatibility_trick=0, use_commit_times=0, 
    cancel_func=0x8055960 <svn_cl__check_cancel>, cancel_baton=0x0, 
    notify_func=0x8059910 <notify>, notify_baton=0xb7437178, 
    scratch_pool=0xb7434018) at subversion/libsvn_wc/adm_crawler.c:861
#29 0xb7fd3506 in update_internal (result_rev=0x0, 
    local_abspath=0xb7434158 "/foo/bar", 
    anchor_abspath=0xb742e708 "/foo/bar", 
    revision=0xbfffeb40, depth=svn_depth_unknown, depth_is_sticky=0, 
    ignore_externals=0, allow_unver_obstructions=0, adds_as_modification=1, 
    timestamp_sleep=0xbfffebec, notify_summary=1, ctx=0xb7e5c7c8, 
    pool=0xb7434018) at subversion/libsvn_client/update.c:399
#30 0xb7fd3bae in svn_client__update_internal (result_rev=0x0, 
    local_abspath=0xb7434158 "/foo/bar", 
    revision=0xbfffecac, depth=svn_depth_unknown, depth_is_sticky=1, 
    ignore_externals=0, allow_unver_obstructions=0, adds_as_modification=1, 
    make_parents=0, innerupdate=0, timestamp_sleep=0xbfffebec, ctx=0xb7e5c7c8, 
    pool=0xb7434018) at subversion/libsvn_client/update.c:541
#31 0xb7f96223 in svn_client__checkout_internal (result_rev=0x0, 
    url=0xb7437980 "http://svn.apache.org/repos/asf/subversion/trunk";, 
    local_abspath=0xb7434158 "/foo/bar", 
    peg_revision=0xbfffecb8, revision=0xbfffecac, ra_cache=0x0, 
    depth=svn_depth_unknown, ignore_externals=0, allow_unver_obstructions=0, 
    timestamp_sleep=0x0, ctx=0xb7e5c7c8, pool=0xb7434018)
    at subversion/libsvn_client/checkout.c:215
#32 0xb7f96385 in svn_client_checkout3 (result_rev=0x0, 
    URL=0xb7437980 "http://svn.apache.org/repos/asf/subversion/trunk";, 
    path=0xb7437b28 "/foo/bar", 
    peg_revision=0xbfffecb8, revision=0xbfffecac, depth=svn_depth_unknown, 
    ignore_externals=0, allow_unver_obstructions=0, ctx=0xb7e5c7c8, 
    pool=0xb7434018) at subversion/libsvn_client/checkout.c:255
#33 0x0804e36e in svn_cl__checkout (os=0xb7e5c1c0, baton=0xbfffedc4, 
    pool=0xb7e5c018) at subversion/svn/checkout-cmd.c:161
#34 0x080584f8 in main (argc=4, argv=0xbfffefe4) at subversion/svn/main.c:2587

Reply via email to