Nakonec jsem to upravil právě přes to chmod Přidal jsem tam řádek:chmod("./files/$name", 0777);To bude vysvětlení