diff --git a/phpgwapi/inc/class.egw_vfs.inc.php b/phpgwapi/inc/class.egw_vfs.inc.php index d6db71b8b8..4b76caa3a3 100644 --- a/phpgwapi/inc/class.egw_vfs.inc.php +++ b/phpgwapi/inc/class.egw_vfs.inc.php @@ -1304,7 +1304,8 @@ class egw_vfs extends vfs_stream_wrapper static function lock($path,&$token,&$timeout,&$owner,&$scope,&$type,$update=false,$check_writable=true) { // we require write rights to lock/unlock a resource - if (!$path || $update && !$token || $check_writable && !egw_vfs::is_writable($path)) + if (!$path || $update && !$token || $check_writable && + !(egw_vfs::is_writable($path) || !egw_vfs::file_exists($path) && egw_vfs::is_writable(egw_vfs::dirname($path)))) { return false; }