anchor.diff:  
       case fslogic_utils:check_file_perms(FullFileName, UserDocStatus, UserDoc, FileDoc, root) of
           {ok, true} -> ok;
  -        {ok, true} ->
  +        {ok, false} ->
               lager:warning("Changing file's owner without permissions: ~p", [FullFileName]),
               throw(?VEPERM);
           {PermsStat, PermsOK} ->
  -            lager:warning("Cannot check permissions of file. Reason: ~p:~p", [PermsStat, PermsOK]),
  +            lager:warning("Cannot check permissions of file ~p. Reason: ~p:~p", [FullFileName, PermsStat, PermsOK]),
               throw(?VEREMOTEIO)
       end,
   
  
positive.code: 
      case fslogic_utils:check_file_perms(FullFileName, UserDocStatus, UserDoc, FileDoc, root) of
          {ok, true} -> ok;
          {ok, true} ->
              lager:warning("Changing file's permissions without permissions: ~p", [FullFileName]),
              throw(?VEPERM);
          {PermsStat, PermsOK} ->
              lager:warning("Cannot check permissions of file. Reason: ~p:~p", [PermsStat, PermsOK]),
              throw(?VEREMOTEIO)
      end,
  
  
negative.code: 
  
  delete_file(FullFileName) ->
      {ok, FileDoc} = fslogic_objects:get_file(FullFileName),
      {UserDocStatus, UserDoc} = fslogic_objects:get_user(),
  
      case fslogic_utils:check_file_perms(FullFileName, UserDocStatus, UserDoc, FileDoc) of
          {ok, true} -> ok;
          {ok, false} ->
              lager:warning("Deleting file without permissions: ~p", [FullFileName]),
              throw(?VEPERM);
          {PermsStat, PermsOK} ->
              lager:warning("Cannot check permissions of file ~p. Reason: ~p:~p", [FullFileName, PermsStat, PermsOK]),
              throw(?VEREMOTEIO)
      end,
  
      FileDesc = FileDoc#veil_document.record,
      {ok, ChildrenTmpAns} =
          case FileDesc#file.type of
              ?DIR_TYPE ->
                  dao_lib:apply(dao_vfs, list_dir, [FullFileName, 1, 0], fslogic_context:get_protocol_version());
              _OtherType -> {ok, []}
          end,
  
      case length(ChildrenTmpAns) of
          0 ->
              ok = dao_lib:apply(dao_vfs, remove_file, [FullFileName], fslogic_context:get_protocol_version()),
  
              fslogic_meta:update_parent_ctime(fslogic_utils:get_user_file_name(FullFileName), fslogic_utils:time()),
              #atom{value = ?VOK};
          _Other ->
              lager:error([{mod, ?MODULE}], "Error: can not remove directory (it's not empty): ~s", [FullFileName]),
              #atom{value = ?VENOTEMPTY}
      end.
  
  
  