Hp NonStop G-Series Manuel d'utilisateur Page 126

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 213
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 125
Changing Directory Permissions
The procedure for changing directory permissions is the same as that for changing file permissions.
However, to list the information about a directory, you use the ls -ld command, as shown in
the following example:
$ ls -ld project
drwxr-xr-x 2 larry system 32 Jun 5 10:07 project
Now change the permissions with the chmod g+w command so that the group (g) also has write
permission (+w) for the directory /project:
$ chmod g+w project
$ ls -ld project
drwxrwxr-x 2 larry system 32 Jun 5 10:07 project
Using Pattern-Matching Characters
If you want to make the same change to the permissions of all entries in a directory, you can use
the pattern-matching character * (asterisk) with the chmod command.
In the following example, the command chmod g+x * adds execute permission (+x) to the group
(g) for all files (*) in the current directory:
$ chmod g+x *
Now enter the ls -l command to show that the group now has execute permission for all files
in the current directory:
$ ls -l
total 7
-rw-rwxrw- 1 larry system 101 Jun 5 10:03 file1
-rw-r-xr-- 1 larry system 171 Jun 5 10:03 file2
-rw-r-xr-- 1 larry system 130 Jun 5 10:06 file3
drwxrwxr-x 2 larry system 32 Jun 5 10:07 project
-rw-r-xr-- 1 larry system 0 Jun 5 11:03 record1
-rw-r-xr-- 1 larry system 0 Jun 5 11:03 record6
drwxr-xr-x 2 larry system 32 Jun 5 10:31 reports
Setting Absolute Permissions
An absolute permission assignment (=) assigns all permissions for a file or files, regardless of what
the permissions were previously. In the following example, the ls -l command lists the permissions
for the file3 file. Then the command chmod a=rwx assigns all permissions (rwx) for a file to all
users (a):
$ ls -l file3
-rw-r-xr-- 1 larry system 130 Jun 5 10:06 file3
$ chmod a=rwx file3
$ ls -l file3
-rwxrwxrwx 1 larry system 130 Jun 5 10:06 file3
126 Managing Access to Files and Directories
Vue de la page 125
1 2 ... 121 122 123 124 125 126 127 128 129 130 131 ... 212 213

Commentaires sur ces manuels

Pas de commentaire