Skip to content
Advertisement

Symfony Filesystem chmod() sets the incorrect permissions

I am using the Symfony’s Filesystem component, specifically chmod function:

JavaScript

But on the terminal the permissions are weird:

JavaScript

It is supposed to look like this:

JavaScript

Am I doing something wrong? I’m using the 5.2.4 version.

Advertisement

Answer

public function chmod($files, int $mode, int $umask = 0000, bool $recursive = false)

The second param of the function is the number, you are passing a string. And check that you have a correct file owner, usually web servers working with www-data user

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement