Sometimes you may need to change permissions for an entire directory and all of its contents. You can do this by using the chmod command with -R option that allows you to apply the command recursively. For example, to make all files and subdirectories within a directory (my_dir) readable...
The directory owner has full access (rwxr-xr-x). All other users are allowed to list the directory, but they are unable to create or delete files. This permission setting is typically used for directories that need to be shared with multiple users. 700 The directory owner has complete acces...
functionspawn(){// try to create directory if it doesn't exist'// added by David McReynolds @ Daylight Studio 9/16/10 to prevent problems of axing the entire directoryif(!is_dir($this->_parser_compile_dir)) { @mkdir($this->_parser_compile_dir,0777,TRUE);chmodr($this->_parser_comp...
Thechmod() system call will fail and the file mode will be unchanged if: [ENOTDIR] A component of the path prefix is not a directory. [ENAMETOOLONG] A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. [ENOENT] The named file does not exis...
CreateDirectory() - Creates a directory on the server. If the parent directories do not exist they are also created. DeleteDirectory() - Deletes the specified directory on the server. If it is not empty then all subdirectories and files are recursively deleted. MoveDirectory() - Moves a di...
find img/ -type d -exec chown www-data:www-data {} \; replacing the "img/" part with whichever directory your altering. The chown -R command your using will change the ownership of all directories as well as all of the files, which is unnecessary....
CreateDirectory() - Creates a directory on the server. If the parent directories do not exist they are also created. DeleteDirectory() - Deletes the specified directory on the server. If it is not empty then all subdirectories and files are recursively deleted. MoveDirectory() - Moves a di...