Le script.sh ne fonctionne toujours pas mais j'ai trouvé d'autres tuto un peu plus complet, je vais me pencher sur la question.
Autre question, je dois aussi mettre une redirection de port du router vers le port nextcloud je présume
Modérateur : carabao
Le script.sh ne fonctionne toujours pas mais j'ai trouvé d'autres tuto un peu plus complet, je vais me pencher sur la question.
Par contre, j'ai pas de PHP 7.1 sur mon nas synology...This version of Nextcloud requires at least PHP 7.1
You are currently running 7.0.33. Please update your PHP version.
Le rendre exécutable ?
code : Tout sélectionner
chmod +x /path/de/ton/fichier
Ah je vais essayer, merciMackguil a écrit :Le rendre exécutable ?code : Tout sélectionner
chmod +x /path/de/ton/fichier
Une fois que j'ai tapé cette commande, je fais quoi ?arl0ng a écrit :Ah je vais essayer, merciMackguil a écrit :Le rendre exécutable ?code : Tout sélectionner
chmod +x /path/de/ton/fichier
Tu nous indiques le résultat de ls -lha /volume1/web/nextcloud/ et si positif tu exécutes le script ./tonscrpt.sh quand tu es dans le répertoire de celui-ci.arl0ng a écrit : ↑28 juil. 2019, 17:17Une fois que j'ai tapé cette commande, je fais quoi ?arl0ng a écrit :Ah je vais essayer, merciMackguil a écrit :
Le rendre exécutable ?code : Tout sélectionner
chmod +x /path/de/ton/fichier
code : Tout sélectionner
root@Maison:~# ls -lha /volume1/web/nextcloud/
total 168K
drwxrwxrwx 15 http http 4.0K Jul 27 18:52 .
d---------+ 7 root root 4.0K Jul 27 19:02 ..
drwxrwxrwx 32 http http 4.0K Jul 27 18:04 3rdparty
drwxrwxrwx 43 http http 4.0K Jul 27 19:09 apps
-rwxrwxrwx 1 http http 12K Jul 9 13:59 AUTHORS
drwxrwxrwx 2 http http 4.0K Jul 27 19:12 config
-rwxrwxrwx 1 http http 3.8K Jul 9 13:59 console.php
-rwxrwxrwx 1 http http 34K Jul 9 13:59 COPYING
drwxrwxrwx 23 http http 4.0K Jul 27 17:56 core
-rwxrwxrwx 1 http http 4.9K Jul 9 13:59 cron.php
drwxrwxrwx 2 http http 4.0K Jul 27 19:06 data
-rwxrwxrwx 1 http http 2.5K Jul 27 19:09 .htaccess
-rwxrwxrwx 1 http http 156 Jul 9 13:59 index.html
-rwxrwxrwx 1 http http 3.1K Jul 9 13:59 index.php
drwxrwxrwx 6 http http 4.0K Jul 27 17:58 lib
-rwxrwxrwx 1 http http 283 Jul 9 13:59 occ
drwxrwxrwx 2 http http 4.0K Jul 27 18:12 ocm-provider
drwxrwxrwx 2 http http 4.0K Jul 9 13:59 ocs
drwxrwxrwx 2 http http 4.0K Jul 9 13:59 ocs-provider
-rwxrwxrwx 1 http http 2.9K Jul 9 13:59 public.php
-rwxrwxrwx 1 http http 5.1K Jul 9 13:59 remote.php
drwxrwxrwx 4 http http 4.0K Jul 27 18:12 resources
-rwxrwxrwx 1 http http 26 Jul 9 13:59 robots.txt
drwxrwxrwx 12 http http 4.0K Jul 27 17:59 settings
-rwxrwxrwx 1 http http 2.2K Jul 9 13:59 status.php
drwxrwxrwx 3 http http 4.0K Jul 27 17:57 themes
drwxrwxrwx 2 http http 4.0K Jul 27 17:56 updater
-rwxrwxrwx 1 http http 101 Jul 9 13:59 .user.ini
-rwxrwxrwx 1 http http 362 Jul 9 14:03 version.php
root@Maison:~# cd /volume1/web
root@Maison:/volume1/web# ./script.sh
: No such file or directoryn/bash
chown: cannot access ‘/volume1/web/nextcloud/\r’: No such file or directory
chown: cannot access ‘/volume1/web/nextcloud/apps/\r’: No such file or directory
chown: cannot access ‘/volume1/web/nextcloud/config/\r’: No such file or directo ry
chown: cannot access ‘/volume1/web/nextcloud/themes/\r’: No such file or directo ry
chown: cannot access ‘/volume1/Nextcloud/\r’: No such file or directory
chown: cannot access ‘/volume1/web/nextcloud/.htaccess\r’: No such file or direc tory
chmod: invalid mode: ‘777\r’
Try 'chmod --help' for more information.
chmod: invalid mode: ‘777\r’
Try 'chmod --help' for more information.
chmod: invalid mode: ‘777\r’
Try 'chmod --help' for more information.
chmod: invalid mode: ‘777\r’
Try 'chmod --help' for more information.
chmod: invalid mode: ‘777\r’
Try 'chmod --help' for more information.
chmod: invalid mode: ‘777\r’
Try 'chmod --help' for more information.
chmod: invalid mode: ‘777\r’
Try 'chmod --help' for more information.
chmod: invalid mode: ‘777\r’
Try 'chmod --help' for more information.
chmod: invalid mode: ‘777\r’
Try 'chmod --help' for more information.
chmod: invalid mode: ‘777\r’
Try 'chmod --help' for more information.
chmod: invalid mode: ‘777\r’
Try 'chmod --help' for more information.
root@Maison:/volume1/web#
code : Tout sélectionner
h#!/bin/bash
chown -R http:http /volume1/web/nextcloud/
chown -R http:http /volume1/web/nextcloud/apps/
chown -R http:http /volume1/web/nextcloud/config/
chown -R http:http /volume1/web/nextcloud/themes/
chown -R http:http /volume1/Nextcloud/
chown http:http /volume1/web/nextcloud/.htaccess
find /volume1/web/nextcloud/ -type f -print0 | xargs -0 chmod 777
find /volume1/web/nextcloud/ -type d -print0 | xargs -0 chmod 777
find /volume1/Nextcloud/ -type d -print0 | xargs -0 chmod 777
chmod 777 /volume1/web/nextcloud/.htaccess
Tu as bien un problème de fin de ligne “windows” dans ton fichier. Ce sont les ‘\r’ que tu vois dans les messages d’erreur.
Deux solutions :
1) sous Notepad++, Menu Edition – Convertir les sauts de ligne – Convertir au format Unix (LF). Puis tu sauves ton fichier, le recopies, etc…
2) Sous Linux, via PuTTY : taper la commande suivante (qui va effacer ces caractères du monde windows) :
$ tr -d ‘\r’ linux-permissions.sh
code : Tout sélectionner
root@Maison:/volume1/web# sh script.sh
Cpu et ram à la ramasse.
C'est dangereux d’accorder les droits 777 à un répertoire, attention.
arl0ng a écrit : ↑28 juil. 2019, 20:08 :
1) sous Notepad++, Menu Edition – Convertir les sauts de ligne – Convertir au format Unix (LF). Puis tu sauves ton fichier, le recopies, etc…
2) Sous Linux, via PuTTY : taper la commande suivante (qui va effacer ces caractères du monde windows) :
$ tr -d ‘\r’ linux-permissions.sh
code : Tout sélectionner
Dos2unix /tpath/de/ton/fichier
Pour protéger ton serveur: https://blog.bandinelli.net/index.php?p ... t-fail2ban
Merci je vais regarder ça .Mackguil a écrit :Pour protéger ton serveur: https://blog.bandinelli.net/index.php?p ... t-fail2ban
PS: Je te conseille un accès via vpn (le processeur doit suivre) ou tunnel ssh.
Merci, j'avais déjà fait une partie, le compte admin est désactivé depuis un moment et le firewall activé.solar10 a écrit : ↑29 juil. 2019, 12:20 Pour en mettre une couche en plus: https://www.cachem.fr/protegez-nas-attaques/
Il est en promo sur mamazone fr en versions 2/6TB
Tiens il me met page n'existe plus sur mon smartphone Oo
Vous devez être membre pour pouvoir répondre
Vous n‘êtes pas membre ? Inscrivez-vous pour rejoindre notre communauté
Les membres peuvent créer leurs propres sujets et s‘abonner à des sujets
C‘est gratuit et cela ne prend qu‘une minute