Retourner au contenu associé (entrée de forum : chownage et chmodage d'un site web complet)
Posté par robertix le 07 juin 2013 à 21:40. En réponse au message chownage et chmodage d'un site web complet. Évalué à -9.
rsync -avz --chmod=o-rwx -p toto/ toto2/
And here is a full test : Create some file in a folder
$ mkdir toto1 $ mkdir toto2 $ cd toto1 $ touch tyoto $ touch tiuti
The default perms are : u=rw, g=r, o=r
$ ls -l total 0 -rw-r--r-- 1 romain users 0 fév 16 11:48 tiuti -rw-r--r-- 1 romain users 0 fév 16 11:48 tyoto
Try an rsync without params
$ cd .. $ rsync -avz toto1/ toto2/
The destination perms are the same than the source files
$ ls -l toto2 total 0 -rw-r--r-- 1 romain users 0 fév 16 11:48 tiuti -rw-r--r-- 1 romain users 0 fév 16 11:48 tyoto
Specify the rsync options --chmod=o-rwx -p
$ rsync -avz --chmod=o-rwx -p toto1/ toto2/ $ ls -l toto2 total 0 -rw-r----- 1 romain users 0 fév 16 11:48 tiuti -rw-r----- 1 romain users 0 fév 16 11:48 tyoto
avec le setgid --chmod Dg+s
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
# rsync chmod et setgid
Posté par robertix . En réponse au message chownage et chmodage d'un site web complet. Évalué à -9.
rsync -avz --chmod=o-rwx -p toto/ toto2/
And here is a full test :
Create some file in a folder
$ mkdir toto1
$ mkdir toto2
$ cd toto1
$ touch tyoto
$ touch tiuti
The default perms are : u=rw, g=r, o=r
$ ls -l
total 0
-rw-r--r-- 1 romain users 0 fév 16 11:48 tiuti
-rw-r--r-- 1 romain users 0 fév 16 11:48 tyoto
Try an rsync without params
$ cd ..
$ rsync -avz toto1/ toto2/
The destination perms are the same than the source files
$ ls -l toto2
total 0
-rw-r--r-- 1 romain users 0 fév 16 11:48 tiuti
-rw-r--r-- 1 romain users 0 fév 16 11:48 tyoto
Specify the rsync options --chmod=o-rwx -p
$ rsync -avz --chmod=o-rwx -p toto1/ toto2/
$ ls -l toto2
total 0
-rw-r----- 1 romain users 0 fév 16 11:48 tiuti
-rw-r----- 1 romain users 0 fév 16 11:48 tyoto
avec le setgid
--chmod Dg+s