8 file.inc drupal_chmod($uri, $mode = NULL)
7 file.inc drupal_chmod($uri, $mode = NULL)

Sets the permissions on a file or directory.


in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use \Drupal\Core\File\FileSystem::chmod().

Related topics

9 calls to drupal_chmod()
FileStorage::write in core/lib/Drupal/Core/Config/FileStorage.php
Writes configuration data to the storage.
file_prepare_directory in core/includes/file.inc
Checks that the directory exists and is writable.
file_save_htaccess in core/includes/file.inc
Creates a .htaccess file in the given directory.
file_save_upload in core/modules/file/file.module
Saves file uploads to a new location.
file_unmanaged_copy in core/includes/file.inc
Copies a file to a new location without invoking the file API.

... See full list


core/includes/file.inc, line 1024
API for handling file uploads and server file management.


function drupal_chmod($uri, $mode = NULL) {
  return \Drupal::service('file_system')->chmod($uri, $mode);