code: public void copyAccessControlEntries(
          CmsDbContext dbc,
          CmsResource source,
          CmsResource destination,
          boolean updateLastModifiedInfo)
      throws CmsException {
  
          // get the entries to copy
          ListIterator<CmsAccessControlEntry> aceList = getUserDriver(
              dbc).readAccessControlEntries(dbc, dbc.currentProject(), source.getResourceId(), false).listIterator();
  
          // remove the current entries from the destination
          getUserDriver(dbc).removeAccessControlEntries(dbc, dbc.currentProject(), destination.getResourceId());
  
          // now write the new entries
          while (aceList.hasNext()) {
              CmsAccessControlEntry ace = aceList.next();
              getUserDriver(dbc).createAccessControlEntry(
                  dbc,
                  dbc.currentProject(),
                  destination.getResourceId(),
                  ace.getPrincipal(),
                  ace.getPermissions().getAllowedPermissions(),
                  ace.getPermissions().getDeniedPermissions(),
                  ace.getFlags());
          }
  
          // log it
          log(
              dbc,
              new CmsLogEntry(
                  dbc,
                  destination.getStructureId(),
                  CmsLogEntryType.RESOURCE_PERMISSIONS,
                  new String[] {destination.getRootPath()}),
              false);
  
          // update the "last modified" information
          if (updateLastModifiedInfo) {
              setDateLastModified(dbc, destination, destination.getDateLastModified());
          }
  
          // clear the cache
          m_monitor.clearAccessControlListCache();
  
          // fire a resource modification event
          Map<String, Object> data = new HashMap<String, Object>(2);
          data.put(I_CmsEventListener.KEY_RESOURCE, destination);
          data.put(I_CmsEventListener.KEY_CHANGE, new Integer(CHANGED_ACCESSCONTROL));
          OpenCms.fireCmsEvent(new CmsEvent(I_CmsEventListener.EVENT_RESOURCE_MODIFIED, data));
      }
docs: Copies the access control entries of a given resource to a destination resource.<p>
  
  Already existing access control entries of the destination resource are removed.<p>
  
  @param dbc the current database context
  @param source the resource to copy the access control entries from
  @param destination the resource to which the access control entries are copied
  @param updateLastModifiedInfo if true, user and date "last modified" information on the target resource will be updated
  
  @throws CmsException if something goes wrong