Maprechten aanpassen
Maxim Heijndijk
macchus op gmail.com
Wo mei 7 20:38:07 UTC 2008
Ben Bridts schreef:
> Geen idee hoe betrouwbaar mijn bron is maar ik vond dit op
> http://www.ss64.com/bash/chmod.html en http://www.ss64.com/bash/chown.html
>> chmod never changes the permissions of symbolic links. This is not a
>> problem since the permissions of symbolic links are never used.
>> However, for each symbolic link listed on the command line, chmod
>> changes the permissions of the pointed-to file. In contrast, chmod
>> ignores symbolic links encountered during recursive directory traversals.
> en
>> -h
>> --no-dereference
>> Act on symbolic links themselves instead of what they point to.
>> This is the default. This mode relies on the `lchown' system call.
>> On systems that do not provide the `lchown' system call, `chown'
>> fails when a file specified on the command line is a symbolic link.
>> By default, no diagnostic is issued for symbolic links encountered
>> during a recursive traversal, but see `--verbose'.
Testje hieronder. zowel chmod als chown gaan gewoon over de links. De
opties werken niet. Oppassen geblazen dus!
[root op heijndijk /]# ls -lR test
test:
drwxr-xr-x 2 root root 4096 2008-05-07 22:23 test1/
drwxr-xr-x 3 root root 4096 2008-05-07 22:23 test2/
test/test1:
lrwxrwxrwx 1 root root 11 2008-05-07 22:22 testlink -> /test/test2/
test/test2:
drwxr-xr-x 2 root root 4096 2008-05-07 22:23 testdir2/
test/test2/testdir2:
-rw-r--r-- 1 root root 0 2008-05-07 22:23 testfile2
[root op heijndijk /]# chown -R max:max test
[root op heijndijk /]# ls -lR test
test:
drwxr-xr-x 2 max max 4096 2008-05-07 22:23 test1/
drwxr-xr-x 3 max max 4096 2008-05-07 22:23 test2/
test/test1:
lrwxrwxrwx 1 max max 11 2008-05-07 22:22 testlink -> /test/test2/
test/test2:
drwxr-xr-x 2 max max 4096 2008-05-07 22:23 testdir2/
test/test2/testdir2:
-rw-r--r-- 1 max max 0 2008-05-07 22:23 testfile2
[root op heijndijk /]# chmod -R 600 test
[root op heijndijk /]# ls -lR test
test:
drw------- 2 max max 4096 2008-05-07 22:23 test1/
drw------- 3 max max 4096 2008-05-07 22:23 test2/
test/test1:
lrwxrwxrwx 1 max max 11 2008-05-07 22:22 testlink -> /test/test2/
test/test2:
drw------- 2 max max 4096 2008-05-07 22:23 testdir2/
test/test2/testdir2:
-rw------- 1 max max 0 2008-05-07 22:23 testfile2
[root op heijndijk /]# chmod -R -h 666 test
chmod: ongeldige optie -- h
Probeer `chmod --help' voor meer informatie.
[root op heijndijk /]# chmod -R --no-dereference 666 test
chmod: onbekende optie '--no-dereference'
Probeer `chmod --help' voor meer informatie.
--
Maxim Heijndijk
Scripts - http://www.maccusfoto.nl/maxmenu
Meer informatie over de Ubuntu-NL
maillijst