Revision history for FilesActionInfo
Additions:
<<==Note==
If the WikkaWiki directory tree is copied or moved from an old system to another system that has SELinux enabled (enforcing) then the copied/moved files and directories may not have the correct SELinux context types. If this is the case, the ##""{{files}}""## action could be prevented from working correctly by SELinux enforcement even if the owner and permissions are already set correctly.
The ##actions/files/files.php## script file (and possibly other .php files in the WikkaWiki install directory) must have the SELinux context type ##httpd_sys_script_exec_t## to permit use of the PHP file creation routines. Without the correct context on the script, file uploads may fail. From the wiki base install directory, check for the correct SELinux context by entering the command:
ls -Z actions/files/files.php
If the listed SELinux security context type is not ##httpd_sys_script_exec_t##, change it with the command:
chcon -t httpd_sys_script_exec_t actions/files/files.php
Assuming the permissions and owner on the ##uploads## directory are correct, the entire ##uploads## directory tree must have the ##httpd_sys_script_rw_t## SELinux context type so that scripts (.php files) running in the web server process are allowed read/write access. Check this with the command:
ls -dZ uploads
If the listed SELinux security context type is not ##httpd_sys_script_rw_t##, change it with the command:
chcon -R -t httpd_sys_script_rw_t uploads
//Thanks to Mike Shultz and [[http://www.mediawiki.org/wiki/SELinux#Uploading_Images]]//
<<
>>**See | also**
[[http://wikkawiki.org/FilesActionSafeModeWorkaround | FilesActionSafeModeWorkaround]]>>::c::
If the WikkaWiki directory tree is copied or moved from an old system to another system that has SELinux enabled (enforcing) then the copied/moved files and directories may not have the correct SELinux context types. If this is the case, the ##""{{files}}""## action could be prevented from working correctly by SELinux enforcement even if the owner and permissions are already set correctly.
The ##actions/files/files.php## script file (and possibly other .php files in the WikkaWiki install directory) must have the SELinux context type ##httpd_sys_script_exec_t## to permit use of the PHP file creation routines. Without the correct context on the script, file uploads may fail. From the wiki base install directory, check for the correct SELinux context by entering the command:
ls -Z actions/files/files.php
If the listed SELinux security context type is not ##httpd_sys_script_exec_t##, change it with the command:
chcon -t httpd_sys_script_exec_t actions/files/files.php
Assuming the permissions and owner on the ##uploads## directory are correct, the entire ##uploads## directory tree must have the ##httpd_sys_script_rw_t## SELinux context type so that scripts (.php files) running in the web server process are allowed read/write access. Check this with the command:
ls -dZ uploads
If the listed SELinux security context type is not ##httpd_sys_script_rw_t##, change it with the command:
chcon -R -t httpd_sys_script_rw_t uploads
//Thanks to Mike Shultz and [[http://www.mediawiki.org/wiki/SELinux#Uploading_Images]]//
<<
>>**See | also**
[[http://wikkawiki.org/FilesActionSafeModeWorkaround | FilesActionSafeModeWorkaround]]>>::c::
Deletions:
[[http://wikkawiki.org/FilesActionSafeModeWorkaround | FilesActionSafeModeWorkaround]]>>
example:
{{files}}
Revision [2336]
Edited on 2013-07-30 17:51:28 by ChrisCase [fixed the documentation on changing the max upload size]Additions:
[[http://wikkawiki.org/Mod015fFilesAction Mod for the files action]]
%%(php;58;files.php)
// if(!defined('MAX_UPLOAD_SIZE')) define('MAX_UPLOAD_SIZE', 2097152);
if(!defined('MAX_UPLOAD_SIZE')) define('MAX_UPLOAD_SIZE', 4194304);
%%(php;58;files.php)
// if(!defined('MAX_UPLOAD_SIZE')) define('MAX_UPLOAD_SIZE', 2097152);
if(!defined('MAX_UPLOAD_SIZE')) define('MAX_UPLOAD_SIZE', 4194304);
Deletions:
%%(php;44;files.php)
// $max_upload_size = "1048576"; // 1 Megabyte
$max_upload_size = "2097152"; // 2 Megabyte
No Differences
Deletions:
Additions:
==Upload limits==
As for a default install, a limit of 2 Megabyte for the (maximum) size of a file exists. You can find it in
%%(php;44;files.php)
// $max_upload_size = "1048576"; // 1 Megabyte
$max_upload_size = "2097152"; // 2 Megabyte
%%
If you want to enhance the limit you can do so by changing the file (note that the limit has to be written as a number of bytes).
Please note that PHP itself imposes a limit on file-uploads. You can find the parameter in the
%%(ini;php.ini)
upload_max_filesize
%%
with a default set to 2 megabyte.
As for a default install, a limit of 2 Megabyte for the (maximum) size of a file exists. You can find it in
%%(php;44;files.php)
// $max_upload_size = "1048576"; // 1 Megabyte
$max_upload_size = "2097152"; // 2 Megabyte
%%
If you want to enhance the limit you can do so by changing the file (note that the limit has to be written as a number of bytes).
Please note that PHP itself imposes a limit on file-uploads. You can find the parameter in the
%%(ini;php.ini)
upload_max_filesize
%%
with a default set to 2 megabyte.
Additions:
[[http://wikkawiki.org/FilesActionSafeModeWorkaround | FilesActionSafeModeWorkaround]]>>
Deletions:
Additions:
[[http://wikkawiki.org/FilesActionSafeModeWorkaround | FilesActionSafeModeWorkaround]]
Deletions:
Additions:
HomePage
[[http://wikkawiki.org/Mod015fFilesAction | Mod for the files action]]
For the development page, take a look at [[http://wikkawiki.org/FilesAction | FilesAction]].
http://wikkawiki.org/FilesActionSafeModeWorkaround FilesActionSafeModeWorkaround]]
[[http://wikkawiki.org/VictorManuelVarela | VictorManuelVarela]]
CategoryEN
[[http://wikkawiki.org/Mod015fFilesAction | Mod for the files action]]
For the development page, take a look at [[http://wikkawiki.org/FilesAction | FilesAction]].
http://wikkawiki.org/FilesActionSafeModeWorkaround FilesActionSafeModeWorkaround]]
[[http://wikkawiki.org/VictorManuelVarela | VictorManuelVarela]]
CategoryEN
Deletions:
[[http://wikka.jsnx.com/Mod015fFilesAction | Mod for the files action]]
For the development page, take a look at FilesAction.
FilesActionSafeModeWorkaround
>>//Once the planned 'autodoc' feature for actions is "live", this page will contain the automatically-generated documentation by just including an action; for now, I've just manually created the text.//
VictorManuelVarela
CategoryDocumentation