179 shaares
2 results
tagged
nextcloud
<html lang="fr">
<head>
<meta charset="utf-8">
<title>menu nextcloud</title>
<link rel="stylesheet">
<style type="text/css">
a {
border: 0;
margin: 0;
padding: 0;
border: 0;
outline: 0;
text-decoration: none;
cursor: pointer;
}
#appmenu_perso {
width: 50px;
margin-left: 300px;
background-color: #1e84d0;
direction: rtl;
}
#appmenu_perso:hover > #appmenu_perso1 { display: flex }
#appmenu_perso_menu {
width: 50px;
height: 50px;
opacity: 0.6;
}
#appmenu_perso_menu:hover {
opacity: 1;
}
#appmenu_perso_menu svg {
margin: 15px;
}
#appmenu_perso1 {
display: none;
flex-flow: column wrap;
width: 250px;
background-color: #fff;
border: 5px solid #1e84d0;
direction: ltr;
}
#appmenu_perso1 > * {
display: flex;
flex-flow: row;
}
#appmenu_perso1 a {
/*position: relative;*/
margin: 0;
height: 50px;
width: 50px;
align-items: center;
justify-content: center;
opacity: 0.6;
}
#appmenu_perso1 a:hover {
opacity: 1;
}
</style>
</head>
<body>
<div id="appmenu_perso">
<div id="appmenu_perso_menu" aria-label="More">
<a href="#">
<svg viewBox="0 0 20 20" alt="" height="20">
<image x="0" y="0" width="20" height="20" preserveAspectRatio="xMinYMin meet" xlink:href="../Pictures/logos/check-plus.svg"></image>
</svg>
</a>
</div>
<div id="appmenu_perso1">
<!-- CONTROL
-->
<div>
<a href="http://ambau.ovh:1777/haproxy-stats?" title="HAproxy ambau" target="_blank">
<svg viewBox="0 0 50 50" alt="" height="50">
<image x="5" y="5" width="40" height="40" preserveAspectRatio="xMinYMin meet" xlink:href="../Pictures/logos/haproxy.svg"></image>
</svg>
</a>
<a href="https://ambau.ovh/server-status" title="Apache status ambau" target="_blank">
<svg viewBox="0 0 50 50" alt="" height="50">
<image x="5" y="5" width="40" height="40" preserveAspectRatio="xMinYMin meet" xlink:href="../Pictures/logos/apache-status.svg"></image>
</svg>
</a>
<a href="https://ambau.ovh/server-info" title="Apache info ambau" target="_blank">
<svg viewBox="0 0 50 50" alt="" height="50">
<image x="5" y="5" width="40" height="40" preserveAspectRatio="xMinYMin meet" xlink:href="../Pictures/logos/apache-info.svg"></image>
</svg>
</a>
<a href="http://ambau.ovh/status-www?html&full" title="PHP status ambau" target="_blank">
<svg viewBox="0 0 50 50" alt="" height="50">
<image x="5" y="15" width="40" height="22" preserveAspectRatio="xMinYMin meet" xlink:href="../Pictures/logos/php.svg"></image>
</svg>
</a>
<a href="http://ambau.ovh:1778/" title="RspamD ambau" target="_blank">
<svg viewBox="0 0 50 50" alt="" height="50">
<image x="5" y="5" width="40" height="40" preserveAspectRatio="xMinYMin meet" xlink:href="../Pictures/logos/rspamd.svg"></image>
</svg>
</a>
</div>
<!-- TOOLS
-->
<div>
<a href="https://code.ambau.ovh/" title="Shaarli code ambau" target="_blank">
<svg viewBox="0 0 50 50" alt="" height="50">
<image x="5" y="5" width="40" height="40" preserveAspectRatio="xMinYMin meet" xlink:href="../Pictures/logos/shaarli-code.svg"></image>
</svg>
</a>
<a href="https://info.ambau.ovh/" title="Shaarli info ambau" target="_blank">
<svg viewBox="0 0 50 50" alt="" height="50">
<image x="5" y="5" width="40" height="40" preserveAspectRatio="xMinYMin meet" xlink:href="../Pictures/logos/shaarli-info.svg"></image>
</svg>
</a>
<a href="https://links.ambau.ovh/" title="Shaarli links ambau" target="_blank">
<svg viewBox="0 0 50 50" alt="" height="50">
<image x="5" y="5" width="40" height="40" preserveAspectRatio="xMinYMin meet" xlink:href="../Pictures/logos/shaarli-links.svg"></image>
</svg>
</a>
</div>
<!-- OVH
-->
<div>
<a href="https://www.ovh.com//manager/web/login.html" title="ovh" target="_blank">
<svg viewBox="0 0 50 50" alt="" height="50">
<image x="5" y="5" width="40" height="40" preserveAspectRatio="xMinYMin meet" xlink:href="../Pictures/logos/ovh.svg"></image>
</svg>
</a>
<a href="https://www.kimsufi.com/fr/manager/#/login" title="kimsufi" target="_blank">
<svg viewBox="0 0 50 50" alt="" height="50">
<image x="5" y="5" width="40" height="40" preserveAspectRatio="xMinYMin meet" xlink:href="../Pictures/logos/kimsufi.svg"></image>
</svg>
</a>
</div>
<!-- GESTON
-->
<div>
<a href="https://matomo.ambau.ovh/" title="Matomo ambau" target="_blank">
<svg viewBox="0 0 50 50" alt="" height="50">
<image x="5" y="5" width="40" height="40" preserveAspectRatio="xMinYMin meet" xlink:href="../Pictures/logos/matomo.svg"></image>
</svg>
</a>
<a href="https://pma.ambau.ovh/" title="phpMyAdmin ambau" target="_blank">
<svg viewBox="0 0 50 50" alt="" height="50">
<image x="5" y="5" width="40" height="40" preserveAspectRatio="xMinYMin meet" xlink:href="../Pictures/logos/pma.svg"></image>
</svg>
</a>
<a href="https://pfa.ambau.ovh/" title="PostFixAdmin ambau" target="_blank">
<svg viewBox="0 0 50 50" alt="" height="50">
<image x="5" y="5" width="40" height="40" preserveAspectRatio="xMinYMin meet" xlink:href="../Pictures/logos/pfa.svg"></image>
</svg>
</a>
<a href="https://roundcube.ambau.ovh/" title="RopundCube ambau" target="_blank">
<svg viewBox="0 0 50 50" alt="" height="50">
<image x="5" y="5" width="40" height="40" preserveAspectRatio="xMinYMin meet" xlink:href="../Pictures/logos/roundcube.svg"></image>
</svg>
</a>
</div>
</div>
</div>
</body>
</html>
OCC
occ
path2occ="/var/share/www/cloud/occ"
sudo -u apache php8 $path2occ <command_name>
help
Displays help for a command
help [options] [--] [<command_name>]
list
Lists commands
list [options] [--] [<namespace>]
Global options
--format=FORMAT The output format (txt, xml, json, or md) [default: "txt"]
--raw # To output raw command help
-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, 2 for more verbose output and 3 for debug
Available commands
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 installation of a new release. The release has to be installed before
activity
activity:send-mails # Sends the activity notification mails
app
app:check-code # check code to be compliant
app:disable # disable an app
app:enable # enable an app
app:getpath # Get an absolute path to the app directory
app:install # install an app
app:list # List all available apps
app:remove # remove an app
app:update # update an app or all apps
audioplayer
audioplayer:reset # reset audio player library
audioplayer:scan # scan for new audio files; use -v for debugging
background
background:ajax # Use ajax to run background jobs
background:cron # Use cron to run background jobs
background:webcron # Use webcron to run background jobs
config
config:app:delete # Delete an app config value
config:app:get # Get an app config value
config:app:set # Set an app config value
config:import # Import a list of configs
config:list # List all configs
config:system:delete # Delete a system config value
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:list-calendars # List all calendars of a user
dav:move-calendar # Move a calendar from an user to another
dav:remove-invalid-shares # Remove invalid dav shares
dav:send-event-reminders # Sends event reminders
dav:sync-birthday-calendar # Synchronizes the birthday calendar
dav:sync-system-addressbook # Synchronizes users to the system addressbook
db
db:add-missing-indices # Add missing indices to the database tables
db:convert-filecache-bigint # Convert the ID columns of the filecache to BigInt
db:convert-mysql-charset # Convert charset of MySQL/MariaDB to use utf8mb4
db:convert-type # Convert the Nextcloud database to the newly configured one
deck
deck:export # Export a JSON dump of user data
encryption
encryption:change-key-storage-root Change key storage root
encryption:decrypt-all # Disable server-side encryption and decrypt all files
encryption:disable # Disable encryption
encryption:enable # Enable encryption
encryption:encrypt-all # Encrypt all files for all users
encryption:list-modules # List all available encryption modules
encryption:set-default-module # Set the encryption default module
encryption:show-key-storage-root # Show current key storage root
encryption:status # Lists the current status of encryption
federation
federation:sync-addressbooks # Synchronizes addressbooks of all federated clouds
files
files:cleanup # cleanup filecache
files:recommendations:recommend
files:scan # rescan filesystem
files:scan-app-data # rescan the AppData folder
files:transfer-ownership # All files and folders are moved to another user - shares are moved as well
group
group:add # Add a group
group:adduser # add a user to a group
group:delete # Remove a group
group:list # list configured groups
group:removeuser # remove a user from a group
integrity
integrity:check-app # Check integrity of an app using a signature
integrity:check-core # Check integrity of core code using a signature
integrity:sign-app # Signs an app using a private key
integrity:sign-core # Sign core using a private key
l10n
l10n:createjs # Create javascript translation files for a given app
log
log:file # manipulate logging backend
log:manage # manage logging configuration
log:tail # Tail the nextcloud logfile
log:watch # Watch the nextcloud logfile
maintenance
maintenance:data-fingerprint # update the systems data-fingerprint after a backup is restored
maintenance:mimetype:update-db # Update database mimetypes and update filecache
maintenance:mimetype:update-js # Update mimetypelist.js
maintenance:mode # set maintenance mode
maintenance:repair # repair this installation
maintenance:theme:update # Apply custom theme changes
maintenance:update:htaccess # Updates the .htaccess file
migrations
migrations:execute # Execute a single migration version manually.
migrations:generate #
migrations:generate-from-schema #
migrations:migrate # Execute a migration to a specified version or the latest available version.
migrations:status # View the status of a set of migrations.
notification
notification:generate # Generate a notification for the given user
security
security:certificates # list trusted certificates
security:certificates:import # import trusted certificate
security:certificates:remove # remove trusted certificate
sharing
sharing:cleanup-remote-storages # Cleanup shared storage entries that have no matching entry in the shares_external table
social
social:account:create # Create a new social account
social:account:following # Following a new account
social:cache:refresh # Update the cache
social:check:install # Check the integrity of the installation
social:fediverse # Allow or deny access to the fediverse
social:note:boost # Boost a note
social:note:create # Create a new note
social:note:like # Like a note
social:queue:process # Process the request queue
social:queue:status # Return status on the request queue
social:reset # Reset ALL data related to the Social App
social:stream # Get stream by timeline and viewer
talk
talk:command:add # Add a new command
talk:command:add-samples # Adds some sample commands: /wiki, …
talk:command:delete # Remove an existing command
talk:command:list # List all available commands
talk:command:update # Add a new command
talk:signaling:add # Add an external signaling server.
talk:signaling:delete # Remove an existing signaling server.
talk:signaling:list # List external signaling servers.
talk:stun:add # Add a new STUN server.
talk:stun:delete # Remove an existing STUN server.
talk:stun:list # List STUN servers.
talk:turn:add # Add a TURN server.
talk:turn:delete # Remove an existing TURN server.
talk:turn:list # List TURN servers.
trashbin
trashbin:cleanup # Remove deleted files
trashbin:expire # Expires the users trashbin
twofactorauth
twofactorauth:cleanup # Clean up the two-factor user-provider association of an uninstalled/removed provider
twofactorauth:disable # Disable two-factor authentication for a user
twofactorauth:enable # Enable two-factor authentication for a user
twofactorauth:enforce # Enabled/disable enforced two-factor authentication
twofactorauth:state # Get the two-factor authentication (2FA) state of a user
update
update:check # Check for server and app updates
user
user:add # adds a user
user:delete # deletes the specified user
user:disable # disables the specified user
user:enable # enables the specified user
user:info # show user info
user:lastseen # shows when the user was logged in last time
user:list # list configured users
user:report # shows how many users have access
user:resetpassword # Resets the password of the named user
user:setting # Read and modify user settings
versions
versions:cleanup # Delete versions
versions:expire # Expires the users file versions
TRICK
clean lock files
-
put Nextcloud in maintenance mode
sudo -u www-data php occ maintenance:mode --on
or edit config/config.php and change this line:
'maintenance' => true,
-
Empty table oc_file_locks
# DELETE FROM oc_file_locks WHERE 1 DELETE FROM oc_file_locks;
-
disable maintenance mode (undo first step)
scan user files
sudo -u www-data php $path2occ files:scan --path user/files
sudo -u www-data php $path2occ files:scan --all
scan audio player
sudo -u www-data php $path2occ audioplayer:scan aguy --debug
sudo -u www-data php $path2occ audioplayer:reset --all
transfer all files and shares from one user to another
sudo -u www-data php occ files:transfer-ownership <source-user> <destination-user>
sudo -u www-data php occ files:transfer-ownership --path="path_to_dir" <source-user> <destination-use
SQL
SELECT * FROM `oc_share` WHERE share_with LIKE 'lcherid';
SELECT SUBSTRING(file_target, 6) AS filetarget FROM `oc_share` WHERE share_with LIKE 'lcherid' AND file_target LIKE '/tmp/%';
SELECT name,fileid FROM `oc_filecache` WHERE path LIKE '%/hd/%' AND name IN (SELECT SUBSTRING(file_target, 6) AS filetarget FROM `oc_share` WHERE share_with LIKE 'lcherid' AND file_target LIKE '/tmp/%');
SELECT 0,'lcherid',null,'aguy','aguy',null,'file',fileid,null,fileid,CONCAT('/',name),3,1534492000,0,null,null,0,null FROM `oc_filecache` WHERE path LIKE '%/hd/%' AND name IN (SELECT SUBSTRING(file_target, 6) AS filetarget FROM `oc_share` WHERE share_with LIKE 'lcherid' AND file_target LIKE '/tmp/%');
INSERT INTO `oc_share` (share_type,share_with,password,uid_owner,uid_initiator,parent,item_type,item_source,item_target,file_source,file_target,permissions,stime,accepted,expiration,token,mail_send,share_name)
SELECT 0,'lcherid',null,'aguy','aguy',null,'file',fileid,null,fileid,CONCAT('/',name),3,1534492000,0,null,null,0,null FROM `oc_filecache` WHERE path LIKE '%/hd/%' AND name IN (SELECT SUBSTRING(file_target, 6) AS filetarget FROM `oc_share` WHERE share_with LIKE 'lcherid' AND file_target LIKE '/tmp/%');
INSERT INTO `oc_share` (`share_type`, `share_with`, `password`, `uid_owner`, `uid_initiator`, `parent`, `item_type`, `item_source`, `item_target`, `file_source`, `file_target`, `permissions`, `stime`, `accepted`, `expiration`, `token`, `mail_send`, `share_name`)
SELECT 0,'teichmann',NULL,'aguy','aguy',NULL,'file',fileid,NULL,fileid,concat('/',name),1,1534155903,0,NULL,NULL,0,NULL FROM `oc_filecache` WHERE path LIKE 'files/perso/photos/paris/1992-%' ORDER BY path
;
# add hd
INSERT INTO `oc_share` (`share_type`, `share_with`, `password`, `uid_owner`, `uid_initiator`, `parent`, `item_type`, `item_source`, `item_target`, `file_source`, `file_target`, `permissions`, `stime`, `accepted`, `expiration`, `token`, `mail_send`, `share_name`)
SELECT 0,'elyazid',NULL,'aguy','aguy',NULL,'file',fileid,NULL,fileid,concat('/tmp/',name),3,1534179000,0,NULL,NULL,0,NULL FROM `oc_filecache` WHERE path LIKE '%/hd/%' AND CONCAT('/',name) IN (SELECT file_target FROM `oc_share` WHERE share_with LIKE 'elyazid' AND file_target NOT LIKE '/algerie/%');
;