Nextcloud’ un komut satırını kullanma!
İdris koç
Eğitmenin Adı
Nextcloud komut satırı
15 Ağustos 2018
Nextcloud kurulum dizininizde ilk değişiklik yapmak için komut söyledir.
cd /var/www/nextcloud
ve gerekiyorsa bulutunuzu bakım modunda ayarlayın:
sudo -u www-data php occ maintenance:mode --on
Maintenance mode enabled
Nextcloud’ ta işlem bittikten sonra bakım modunu “kapalı” olarak ayarlamayı unutmayın:
sudo -u www-data php occ maintenance:mode --off
Maintenance mode disabled
Nextcloud arka plan işlerini çalıştırmak için Cron veya AJAX kullanın:
sudo -u www-data php occ background:cron
Set mode for background jobs to 'cron'
sudo -u www-data php occ background:ajax
Set mode for background jobs to 'ajax'
Nextcloud verilerinizi yeniden tarayın:
sudo -u www-data php occ files:scan --all -v
Scanning files for 2 users
Starting scan for user 1 out of 2 (admin)
Folder /admin/
Folder /admin/files
File /admin/files/Nextcloud.mp4
File /admin/files/Nextcloud Manual.pdf
Folder /admin/files/Documents
File /admin/files/Documents/About.odt
Folder /admin/files/Photos
File /admin/files/Photos/Coast.jpg
File /admin/files/Photos/Nut.jpg
File /admin/files/Photos/Ekran Resmi 2018-09-27 12.19.19.png
File /admin/files/Photos/Hummingbird.jpg
Folder /admin/cache
Starting scan for user 2 out of 2 (idriskoc)
Folder /idriskoc/
Folder /idriskoc/files
File /idriskoc/files/Nextcloud.mp4
File /idriskoc/files/Nextcloud Manual.pdf
Folder /idriskoc/files/Documents
File /idriskoc/files/Documents/About.odt
Folder /idriskoc/files/Photos
Folder /idriskoc/files_encryption/keys/files/Documents/About.txt/OC_DEFAULT_MODULE
Folder /idriskoc/files_encryption/keys/files/Photos
Folder /idriskoc/files_encryption/keys/files/Photos/Coast.jpg
Folder /idriskoc/files_encryption/keys/files/Photos/Nut.jpg
Folder /idriskoc/cache
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 35 | 31 | 00:00:00 |
+---------+-------+--------------+
Veya belirli bir kullanıcının verilerini tarayabilirsiniz:
sudo -u www-data php occ files:scan idriskoc -v
Starting scan for user 1 out of 1 (idriskoc)
Folder /idriskoc/
Folder /idriskoc/files
File /idriskoc/files/Nextcloud.mp4
File /idriskoc/files/Nextcloud Manual.pdf
Folder /idriskoc/files/Documents
File /idriskoc/files/Documents/About.odt
File /idriskoc/files/Documents/About.txt
Folder /idriskoc/files/Photos
File /idriskoc/files/Photos/Coast.jpg
File /idriskoc/files/Photos/Nut.jpg
File /idriskoc/files/Photos/Hummingbird.jpg
Folder /idriskoc/files_encryption
Folder /idriskoc/files_encryption/keys
Folder /idriskoc/files_encryption/keys/files
Folder /idriskoc/files_encryption/keys/files/Nextcloud.mp4
Folder /idriskoc/files_encryption/keys/files/Nextcloud Manual.pdf
Folder /idriskoc/files_encryption/keys/files/Documents
Folder /idriskoc/files_encryption/keys/files/Documents/About.odt
Folder /idriskoc/files_encryption/keys/files/Documents/About.txt
Folder /idriskoc/files_encryption/keys/files/Photos
Folder /idriskoc/files_encryption/keys/files/Photos/Nut.jpg
Folder /idriskoc/cache
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 24 | 21 | 00:00:00 |
+---------+-------+--------------+
Nextcloud filecache temizlemeyin:
sudo -u www-data php occ files:cleanup
0 orphaned file cache entries deleted
Silinen dosyaları kaldır:
sudo -u www-data php occ trashbin:cleanup idriskoc
Remove deleted files of idriskoc
veya silinmiş tüm dosyaları temizlemek için herhangi bir kullanıcı adı girmeyin:
sudo -u www-data php occ trashbin:cleanup --all-users Remove deleted files for all users Remove deleted files for users on backend Database admin idriskoc
yada config.php doyasını aşağıdaki satırı eklediğiniz sizin yerinize yapacaktır:
- auto – işlemi kendi yapar
- D, auto – silenen bir dosyayı minimum tutulduğu günü değiştirin:
- auto, D – birkaç gün sonra silin:
- D1 ,D2 – önce silmeyin, bir gün sonra silin:
- disabled – otomatik silme işlemini devre dışı bırakır:
Dosyaları 7 gün sonra otomatik olarak siler:
'trashbin_retention_obligation' => 'auto, 7',
Uygulamaları devre dışı bırakın veya etkinleştirin (örneğin, Posta veya galeri, iki faktörlü kimlik doğrulama) gibi:
sudo -u www-data php occ twofactorauth:disable idriskoc
Two-factor authentication disabled for user idriskoc
sudo -u www-data php occ twofactorauth:enable idriskoc
Two-factor authentication enabled for user idriskoc
Galeri uygulamasını Etkinleştir veya Devre dışı bırak:
sudo -u www-data php occ app:enable gallery gallery enabled sudo -u www-data php occ app:disable gallery gallery disabled
Tüm yapılandırma parametrelerini listeleyin:
sudo -u www-data php occ config:list
},
"theming": {
"backgroundMime": "backgroundColor",
"cachebuster": "11",
"enabled": "yes",
"faviconMime": "image\/jpeg",
"installed_version": "1.5.0",
"logoheaderMime": "image\/png",
"types": "logging"
},
"twofactor_backupcodes": {
"enabled": "yes",
"installed_version": "1.3.1",
"types": ""
"updatenotification": {
"bruteforcesettings": "1.1.0",
"core": "13.0.6.1",
"enabled": "yes",
"groupfolders": "1.3.3",
"installed_version": "1.4.1",
"nextant": "1.0.10",
"ojsxc": "3.4.2",
"spreed": "3.2.5",
"types": "",
"update_check_errors": "0"
},
Tüm komutların listesini almak için:
sudo -u www-data php occ
Nextcloud 14.0.1
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
--no-warnings Skip global warnings, show command output only
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output,
Available comma
_completion BASH completion hook.
check check dependencies of the server environment
help Displays help for a command
list Lists commands
status show some status information
upgrade run upgrade routines after i
activity
activity:send-mails Sends the activity notification mails
app:check-code check code to be compliant
app:disable disable an app
app:enable enable an app
app:install install an app
app:list List all available apps
config
config:app:delete Delete an app config value
config:app:get Get an app config value
config:import Import a list of configs
config:list List all configs
config:system:get Get a system config value
config:system:set Set a system config value
dav
dav:create-addressbook Create a dav addressbook
dav:create-calendar Create a dav calendar
dav:remove-invalid-shares Remove invalid dav shares
dav:sync-birthday-calendar Synchronizes the birthday calendar
Kullanıcıyı etkinleştir / devre dışı bırak
sudo -u www-data php occ user:disable admin
The specified user is disabled
Kullanıcıyı tekrar etkinleştirmek için aşağıdaki komutu kullanın:
sudo -u www-data php occ user:enable admin
The specified user is enabled
Kullanıcılar devre dışı bırakıldıktan sonra, bağlı linklerin bağlanlantıların kesileceğini unutmayın:
Şifreleri sıfırlama:
sudo -u www-data php occ user:resetpassword idriskoc
Çıktı:
Warning: Resetting the password when using encryption will result in data loss!
Do you want to continue?
Enter a new password:
Confirm the new password:
Successfully reset password for idriskoc
Şifre değişikliği bilgi maili
Kullanıcıları belirli bir gruba ekleme:
sudo -u www-data php occ user:add IT -g idriskoc
Enter password:
Confirm password:
The user "IT" was created successfully
Created group "idriskoc"
User "IT" added to group "idriskoc"



