777

(rwxrwxrwx) No restrictions on permissions. Anybody may list files, create new files in the directory and delete files in the directory. Generally not a good setting.

755

(rwxr-xr-x) The directory owner has full access. All others may list the directory, but cannot create files nor delete them. This setting is common for directories that you wish to share with other users


path:/var/www/html/phpkobo/research/php-experimental/file-permission/test-folder/
File permissions:0775
is_readable:yes
is_writable:yes

Set file permission to 0655

path:/var/www/html/phpkobo/research/php-experimental/file-permission/test-folder/
File permissions:0775
is_readable:yes
is_writable:yes

Set file permission to 0655 with umask

path:/var/www/html/phpkobo/research/php-experimental/file-permission/test-folder/
File permissions:0775
is_readable:yes
is_writable:yes

Looks like umask won't work for a file!