code: func (s *Server) SetattrV2(p *Packet) (interface{}, error) {
  	res := &ReplySetattrV2{}
  
  	req := new(RequestSetattrV2)
  	err := UnmarshalBinary(p.Payload, req)
  	if err != nil {
  		return nil, err
  	}
  
  	name := req.FileName.Path()
  
  	_, err = os.Stat(name)
  	if err != nil && os.IsNotExist(err) {
  		// assuming this is a virtual file
  		return res, nil
  	}
  
  	uid := -1
  	if req.Attr.Mask&AttrValidUserID == AttrValidUserID {
  		uid = int(req.Attr.UserID)
  	}
  
  	gid := -1
  	if req.Attr.Mask&AttrValidGroupID == AttrValidGroupID {
  		gid = int(req.Attr.GroupID)
  	}
  
  	err = s.chown(name, uid, gid)
  	if err != nil {
  		return nil, err
  	}
  
  	var perm os.FileMode
  
  	if req.Attr.Mask&AttrValidOwnerPerms == AttrValidOwnerPerms {
  		perm |= os.FileMode(req.Attr.OwnerPerms) << 6
  	}
  
  	if req.Attr.Mask&AttrValidGroupPerms == AttrValidGroupPerms {
  		perm |= os.FileMode(req.Attr.GroupPerms) << 3
  	}
  
  	if req.Attr.Mask&AttrValidOtherPerms == AttrValidOtherPerms {
  		perm |= os.FileMode(req.Attr.OtherPerms)
  	}
  
  	if perm != 0 {
  		err = s.chmod(name, perm)
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	return res, nil
  }
docs: // SetattrV2 handles OpSetattrV2 requests