support_topp

Apache-behörigheter

Unix File System Permissions

Please refer to Notation of traditional Unix permissions for an introduction to Unix file system permissions, which is prerequisite to fully understand how the Apache permissions works.

Users

There are two different users operating at an Apache web site; these are www-data and vweb.

  • vweb (id = 1000) is the user under which the FTP account operates. Directories and files created with a FTP client, will have vweb as owner. User vweb is also included in the www-data group.
  • www-data (id = 33) is the user under which PHP operates. Directories and files created by PHP, will have www-data as owner.

Default Directory Permissions

A directory that is created by vweb will have vweb as owner, and the permission string (three-digit octal permission string) will be 755. Which means that the owner (vweb) can read, write and execute the directory and all other users can read and execute the directory.

A directory that is created by www-data will have www-data as owner, and the permission string (three-digit octal permission string) will be 775. Which means that the owner (www-data) and the group (including vweb) can read, write and execute the directory. All other users (in this case, there are no other users) can read and execute the directory.

Default File Permissions

A file that is created by vweb will have vweb as owner, and the permission string (three-digit octal permission string) will be 644. Which means that the owner (vweb) can read and write to the file and all other users can only read the file.

A file that is created by www-data will have www-data as owner, and the permission string (three-digit octal permission string) will be 664. Which means that the owner (www-data) and the group (including vweb) can read and write to the file. All other users (in this case, there are no other users) can only read the file.

Changing Permissions

When Owner is vweb

Changing file permissions on a directory or file where vweb is the owner, can easily be accomplished with a common FTP client. In most FTP clients it is possible to right-click on a directory or file and select option for file permissions.

When Owner is www-data

Changing file permissions on a directory or file where www-data is the owner, the modification needs to be done by the owner, that is by using PHP – i.e. PHP function chmod().

For instructions on how to use PHP function chmod(), please refer to PHP documentation or instructions at W3Schools.

File system permissions can also be changed with a PHP file manager, such as phpFileManager.

Error: Only up to 6 widgets are supported in this layout. If you need more add your own layout.

Följ oss på Facebook!