[
https://issues.apache.org/jira/browse/SVN-4622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15156772#comment-15156772
]
Philip Martin commented on SVN-4622:
------------------------------------
That is very similar to the problem I identified. When the file being reverted
is not owned by the user running revert then the function
svn_io__is_finifo_read_only() checks either user or group permissions rather
than the owner permissions. When that check determines that write access is
missing the revert code attempts to add write access. The function
io_set_file_perms() assumes that write access has to be added for the owner,
not user/group, so it typically finds there is nothing to do.
Still not sure how to fix the problem. I think we either need to remove the
owner/group/other from svn_io__is_finifo_read_only() or spread it more widely
through in other functions.
> revert as root always notifies for files
> ----------------------------------------
>
> Key: SVN-4622
> URL: https://issues.apache.org/jira/browse/SVN-4622
> Project: Subversion
> Issue Type: Bug
> Components: libsvn_subr
> Affects Versions: all
> Reporter: Philip Martin
> Priority: Minor
>
> $ svnadmin create repo
> $ svn import -mm repo/format file://`pwd`/repo/f
> $ umask 0022
> $ svn co file://`pwd`/repo wc
> $ sudo svn revert wc/f
> Reverted 'wc/f'
> The function svn_io__is_finfo_read_only() will check the world permissions
> when invoked with uid=root. A typical umask removes world write so this means
> that root sees every file as read-only. This causes the revert code to invoke
> svn_io_set_file_read_write() and notify. However svn_io_set_file_read_write()
> sets the owner permissions, an operation that succeeds when run as root, and
> obeys the umask so the world permissions remain read-only.
> Reported by:
> https://mail-archives.apache.org/mod_mbox/subversion-users/201602.mbox/%3C56C0738E.9010508%40i.ua%3E
> http://svn.haxx.se/users/archive-2016-02/0061.shtml
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)