最後更新: 2024-06-19
前言
設定檔位置: config/config.php
目錄
config.php
基本設定
; All css and js files will be served by the web server statically in one js file and one css file ; mkdir /home/vhosts/files/public_html/assets ; chown www-data. /home/vhosts/files/public_html/assets 'asset-pipeline.enabled' => true, 'defaultapp' => 'files', 'enable_avatars' => false, 'allow_user_to_change_display_name' => false, ; already logged-in are kicked out of ownCloud instantly 'maintenance' => false, ; ture => 只有 "admin group" 才可以 login 'singleuser' => false,
allow_user_to_change_display_name
* admin 不受此限
allow_user_to_change_mail_address
只有 admin 才能幫他改 e-mail
lost_password_link
'disabled' = 停用了 reset 功能
remove_sender_display_name
Mail notifications about shares include the display name of the sharer in the email "from" address.
This can cause some email filters to block these as impersonation attempts.
Log
'logtimezone' => 'Asia/Hong_Kong', ; 10 megabytes 'log_rotate_size' => 10485760 ,
trashbin 預設係 Enable 的. retention 預設係 auto
- auto: 最多 keey 30 日, 當沒空間時(trashbin_purge_limit)立即刪除.
- D1, D2: 在 D1 與 D2 之間刪除
- disabled: kept forever
'trashbin_retention_obligation' => 30,
其他有關 Settings
- trashbin_skip_directories
- trashbin_skip_extensions
- trashbin_skip_size_threshold
versions_retention_obligation # 與 trashbin_retention_obligation 差不多
Save additional metadata
author, version tag, etc. of each version of uploaded and edited files
'file_storage.save_version_metadata' => false,
* This feature CANNOT be temporarily disabled once enabled.
Disabling and re-enabling would require a repair job that erases all extended versions metadata.
crashdirectory
'crashdirectory' => '/var/www/owncloud/data',
不在 default 的 public_html 內
e.g.
public_html/data/crash-2023-11-22.log
hide version
hide the ownCloud version information in status.php
'version.hide' => true,
查看 Version 的 URL: /status.php
installed true maintenance false needsDbUpgrade false version "" versionstring "" edition "" productname "" product ""
Supported languages
ls -1 settings/l10n/
'default_language' => 'zh_HK',
Session lifetime
# a session after inactivity
# the lifetime is reached, you’ll have to log in again.
# The default is 20 minutes, expressed in seconds.
'session_lifetime' => 60 * 20,
Disable preview generation
By default, ownCloud can generate previews for the following filetypes:
- Image files
- Covers of MP3 files
- Text documents
'enable_previews' => false,
Override cli URL
Use this configuration parameter to specify the base URL for any URLs which are generated
within ownCloud using any kind of command line tools (cron or occ).
找出正確的 URL
curl https://DOMAIN/status.php
e.g.
'overwrite.cli.url' => 'https://YOUR-DOMAIN/',
Search
user.search_min_length
minimum characters entered before a search
Summary
Config by occ cmd
./occ config:system:set --type=boolean --value=false allow_user_to_change_display_name ./occ config:system:set --type=boolean --value=false allow_user_to_change_mail_address ./occ config:system:set --value="disabled" lost_password_link ./occ config:system:set --type=boolean --value=true remove_sender_display_name ./occ config:system:set --value='Asia/Hong_Kong' logtimezone ./occ config:system:set --type=integer --value=10485760 log_rotate_size ./occ config:system:set --type=boolean --value=true version.hide ./occ config:system:set --value=zh_HK default_language ./occ config:system:set --type=integer --value=3600 session_lifetime ./occ config:system:set --type=boolean --value=false enable_previews ./occ config:system:set --value=https://DOMAIN/ overwrite.cli.url ./occ config:system:set --type=integer --value=3 user.search_min_length