Recherche de fichiers inscriptibles

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Inscription: Fév 10, 2004
  • Messages: 13455
  • Loc: Florida
  • Status: Offline

Message Janvier 30th, 2010, 9:18 am

Je peux trouver des fichiers accessible en écriture par le groupe l'utilisation de ce

BASH Code: [ Select ]
find . -perm -g=w


Je peux trouver des fichiers accessible en écriture par d'autres ou accessible en écriture par tous les l'utilisation de ce

BASH Code: [ Select ]
find . -perm -o=w


Comment puis-je combiner les deux en une seule commande, et puis-je avoir l'ignorer les liens symboliques?
  • Anonymous
  • Bot
  • No Avatar
  • Inscription: 25 Feb 2008
  • Messages: ?
  • Loc: Ozzuland
  • Status: Online

Message Janvier 30th, 2010, 9:18 am

  • Don2007
  • Web Master
  • Web Master
  • No Avatar
  • Inscription: Nov 21, 2006
  • Messages: 4924
  • Loc: NY
  • Status: Offline

Message Janvier 30th, 2010, 1:54 pm

http://linux.about.com/od/commands/a/blcmdl1_findx.htm

rechercher. -/ adm O = w, g = w

rechercher. -/ perm o + w, G + W

Il pourrait y avoir quelque chose comme ça, mais je ne sais pas à éliminer les liens sym.
How do you know when a politician is lying? His mouth is moving.
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Inscription: Fév 10, 2004
  • Messages: 13455
  • Loc: Florida
  • Status: Offline

Message Janvier 30th, 2010, 2:48 pm

Cette première semble correcte. Utilisation de la -L pavillon afin que rechercher suit le lien, et examine les autorisations de la cible au lieu du lien symbolique lui-même semble que cela fonctionnera pour la partie lien symbolique.

BASH Code: [ Select ]
find -L . -perm /g=w,o=w


Code: [ Select ]
    -L   Follow symbolic links. When find examines or prints information
       about files, the information used shall be taken from the prop‐
       erties of the file to which the link points, not from the link
       itself (unless it is a broken symbolic link or find is unable to
       examine the file to which the link points). Use of this option
       implies -noleaf. If you later use the -P option, -noleaf will
       still be in effect.  If -L is in effect and find discovers a
       symbolic link to a subdirectory during its search, the subdirec‐
       tory pointed to by the symbolic link will be searched.

       When the -L option is in effect, the -type predicate will always
       match against the type of the file that a symbolic link points
       to rather than the link itself (unless the symbolic link is bro‐
       ken). Using -L causes the -lname and -ilname predicates always
       to return false.
  1.     -L   Follow symbolic links. When find examines or prints information
  2.        about files, the information used shall be taken from the prop‐
  3.        erties of the file to which the link points, not from the link
  4.        itself (unless it is a broken symbolic link or find is unable to
  5.        examine the file to which the link points). Use of this option
  6.        implies -noleaf. If you later use the -P option, -noleaf will
  7.        still be in effect.  If -L is in effect and find discovers a
  8.        symbolic link to a subdirectory during its search, the subdirec‐
  9.        tory pointed to by the symbolic link will be searched.
  10.        When the -L option is in effect, the -type predicate will always
  11.        match against the type of the file that a symbolic link points
  12.        to rather than the link itself (unless the symbolic link is bro‐
  13.        ken). Using -L causes the -lname and -ilname predicates always
  14.        to return false.
Strong with this one, the sudo is.

Afficher de l'information

  • Total des messages de ce sujet: 3 messages
  • Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 146 invités
  • Vous ne pouvez pas poster de nouveaux sujets
  • Vous ne pouvez pas répondre aux sujets
  • Vous ne pouvez pas éditer vos messages
  • Vous ne pouvez pas supprimer vos messages
  • Vous ne pouvez pas joindre des fichiers
 
 

© 2011 Unmelted, LLC. Ozzu® est une marque déposée de Unmelted, LLC