Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

changer les attibuts de fichier / dossiers

2 réponses
Avatar
Une Bévue
j'ai une page web téléchargée depuis le net, qui a l'attribut @ :
.-[yt@server.studio14.private:~/Sites]-[16:13:38]



'->$ ls -al Tonymacx64/
total 360
drwxr-xr-x 4 yt staff 136 17 jui 16:01 .
drwxr-xr-x+ 39 yt staff 1326 17 jui 16:01 ..
-rw-r--r--@ 1 yt staff 181607 17 jui 16:01
MLPostFactor-Install-10.8-on-old-unsupported-Mac.html
drwxrwxr-x@ 82 yt staff 2788 17 jui 16:01
MLPostFactor-Install-10.8-on-old-unsupported-Mac_files

cet attribut vaut :
.-[yt@server.studio14.private:~/Sites]-[16:16:02]



'->$ xattr -l Tonymacx64/*html
com.apple.quarantine: 0000;51bf16c8;SRWare Iron;
.-[yt@server.studio14.private:~/Sites]-[16:46:59]



'->$ xattr -l Tonymacx64/*files/
com.apple.quarantine: 0000;51bf16c8;SRWare Iron;


ils sont donc en quarantaine... ;-)

je ne peux pas les ouvrir par :
http://localhost/Tonymacx64/MLPostFactor-Install-10.8-on-old-unsupported-Mac.html

mais seulement par :
file://localhost/Users/yt/Sites/Tonymacx64/MLPostFactor-Install-10.8-on-old-unsupported-Mac.html
sans avoir droit à une alert box d'ailleurs.

comment supprimer cette quarantaine de manière à pouvoir les lire sur le
lan, ie en utilisant apache2 ?

--
L'homme est imparfait, mais ce n'est pas étonnant
quand on pense à l'époque où il a été créé.
— Alphonse Allais

2 réponses

Avatar
Patrick Stadelmann
In article <51bf241c$,
Une Bévue wrote:

comment supprimer cette quarantaine de manière à pouvoir les lire sur le
lan, ie en utilisant apache2 ?



Normalement, si tu as le autorisations requises, il suffit de faire un
double-click dans le Finder, et de confirmer l'ouverture : le système va
automatiquement enlevé la quarantaine.

Sinon, "xattr" à une option pour le faire, voir "xattr -h" pour la
syntaxe.

Patrick
--
Patrick Stadelmann
Avatar
Une Bévue
Le 17/06/2013 17:55, Patrick Stadelmann a écrit :
Normalement, si tu as le autorisations requises, il suffit de faire un
double-click dans le Finder, et de confirmer l'ouverture : le système va
automatiquement enlevé la quarantaine.



ben j'ai double clické dans le finder, la page s'est ouverte, je n'ai
pas eu droit à une alert box, j'ai pu visualiser la page dans un
butineur en file:///path/vers/le/fichier.
mais en http://localhost... ça ne marche pas même après ça.
d'ailleurs les fichiers sont toujours en quarataine.

Sinon, "xattr" à une option pour le faire, voir "xattr -h" pour la
syntaxe.



ah, c'est -h j'ai lu -N sur le net, j'essaie derechef :
.-[:~/Sites/Tonymacx64]-[20:10:29]

'->$ xattr -h MLPostFactor-Install-10.8-on-old-unsupported-Mac.html
usage: xattr [-l] [-r] [-s] [-v] [-x] file [file ...]
xattr -p [-l] [-r] [-s] [-v] [-x] attr_name file [file ...]
xattr -w [-r] [-s] [-x] attr_name attr_value file [file ...]
xattr -d [-r] [-s] attr_name file [file ...]
xattr -c [-r] [-s] file [file ...]

The first form lists the names of all xattrs on the given file(s).
The second form (-p) prints the value of the xattr attr_name.
The third form (-w) sets the value of the xattr attr_name to the string
attr_value.
The fourth form (-d) deletes the xattr attr_name.
The fifth form (-c) deletes (clears) all xattrs.

options:
-h: print this help
-l: print long format (attr_name: attr_value and hex output has
offsets and
ascii representation)
-r: act recursively
-s: act on the symbolic link itself rather than what the link points to
-v: also print filename (automatic with -r and with multiple files)
-x: attr_value is represented as a hex string for input and output


reste plus qu'à piger la syntaxe pour supprimer cette attribut :
.-[:~/Sites/Tonymacx64]-[20:12:00]

'->$ xattr -l MLPostFactor-Install-10.8-on-old-unsupported-Mac.html
com.apple.quarantine: 0041;51bf16c8;SRWarex20Iron;


bon, avec -p j'arrive à printer la valeur de l'attibut
"com.apple.quarantine" :
.-[:~/Sites/Tonymacx64]-[20:15:41]

'->$ xattr -p com.apple.quarantine
MLPostFactor-Install-10.8-on-old-unsupported-Mac.html
0041;51bf16c8;SRWarex20Iron;
.

je vais peut-être pouvoir le mettre à '' avec l'option -w ça roule :
.-[:~/Sites/Tonymacx64]-[20:16:16]

'->$ xattr -w com.apple.quarantine ' '
MLPostFactor-Install-10.8-on-old-unsupported-Mac.html
.-[:~/Sites/Tonymacx64]-[20:18:42]

'->$ xattr -p com.apple.quarantine
MLPostFactor-Install-10.8-on-old-unsupported-Mac.html

.-[:~/Sites/Tonymacx64]-[20:18:47]

'->$

reste à faire la même chose pour le dossier :

.-[:~/Sites/Tonymacx64]-[20:16:16]

'->$ xattr -w com.apple.quarantine ' '
MLPostFactor-Install-10.8-on-old-unsupported-Mac.html
.-[:~/Sites/Tonymacx64]-[20:18:42]

'->$ xattr -p com.apple.quarantine
MLPostFactor-Install-10.8-on-old-unsupported-Mac.html

.-[:~/Sites/Tonymacx64]-[20:18:47]

'->$


et puis tester.


pas de pot, toujours :
Forbidden

You don't have permission to access /Tonymacx64/ on this server.


bon, j'essaie avec -d qui doit "deleter" l'attribut en question :

.-[:~/Sites/Tonymacx64]-[20:24:26]

'->$ xattr -d com.apple.quarantine
MLPostFactor-Install-10.8-on-old-unsupported-Mac_files/
.-[:~/Sites/Tonymacx64]-[20:26:48]

'->$ xattr -d com.apple.quarantine
MLPostFactor-Install-10.8-on-old-unsupported-Mac.html
.-[:~/Sites/Tonymacx64]-[20:27:11]

'->$ xattr -l MLPostFactor-Install-10.8-on-old-unsupported-Mac.html
.-[:~/Sites/Tonymacx64]-[20:28:01]

'->$ xattr -l MLPostFactor-Install-10.8-on-old-unsupported-Mac_files/
.-[:~/Sites/Tonymacx64]-[20:28:20]

'->$

bon là, au moins il n'ya plus l'attribut "com.apple.quarantine".

j'essaie avec un browser via le net :

zut, j'ai toujours :
Forbidden

You don't have permission to access /Tonymacx64/ on this server.

même après avoir vidé le cache...