[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] WTF: Rettigheder



Torben Andersen skrev:
> Hejsa,
> 
> Meget underligt problem....
> 
> Ifbm. et serverskifte til en FC9, flyttede jeg alle mine data med tar, pakkede ud og lavede en chmod -R a+rwx for at give alle applikationer lov til alt.
> 
> Hvis jeg for en given undermappe ønsker at fjerne x, skrev jeg chmod -R a-x undermappe. Nu kan bruge bare kun læse directories i to niveauer her under. Meget underligt.

Husk at  "r" i et directory som læseadgang til dele af indholdsfortegnelsen
(og ikke meget andet). At undlade "r" kan bruges til at brugere ikke kan se
hvilke filer der er i directory.

"x" i et directory angiver "søgning", f.eks. i forbindelse med tilgang til en fil
eller mere information om de enkelte filer.

"a" er i øvrigt kort for "all", dvs. user+group+others.


> Nogen råd??

jeg prøvede lige det samme som du lavede, og den er god nok,
med følgende filer og rettigheder.

# ls -laR l1
l1:
totalt 24
drwxrwxrwx  3 root root 4096 2009-06-02 14:51 .
drwxrwxrwt 21 root root 8192 2009-06-02 15:04 ..
-rw-rw-rw-  1 root root    5 2009-06-02 14:51 fil1.txt
-rw-rw-rw-  1 root root    5 2009-06-02 14:51 fil2.txt
drw-rw-rw-  3 root root 4096 2009-06-02 15:04 l2

l1/l2:
totalt 16
drw-rw-rw- 3 root root 4096 2009-06-02 15:04 .
drwxrwxrwx 3 root root 4096 2009-06-02 14:51 ..
-rw-rw-rw- 1 root root    5 2009-06-02 14:51 fil3.txt
drw-rw-rw- 2 root root 4096 2009-06-02 15:04 l3

l1/l2/l3:
totalt 12
drw-rw-rw- 2 root root 4096 2009-06-02 15:04 .
drw-rw-rw- 3 root root 4096 2009-06-02 15:04 ..
-rw-rw-rw- 1 root root    5 2009-06-02 15:04 fil4.txt

som bruger frank:

+ jeg kan liste l1 og tilgå fil1.txt og fil2.txt , der er jo "xr" på l1
  så her alt ok.

+ jeg kan kun begrænset liste l2, der er jo ikke "x" for tilgang/søgning :
  ls: kan ikke åbne katalog l1/l2/: Permission denied
  $ ls -lRa l1
  l1:
  total 24
  drwxrwxrwx  3 root root 4096 Jun  2 14:51 .
  drwxrwxrwt 21 root root 8192 Jun  2 15:09 ..
  -rw-rw-rw-  1 root root    5 Jun  2 14:51 fil1.txt
  -rw-rw-rw-  1 root root    5 Jun  2 14:51 fil2.txt
  drw-rw-rw-  3 root root 4096 Jun  2 15:04 l2
  ls: cannot access l1/l2/.: Permission denied
  ls: cannot access l1/l2/..: Permission denied
  ls: cannot access l1/l2/fil3.txt: Permission denied
  ls: cannot access l1/l2/l3: Permission denied

  l1/l2:
  total 0
  d????????? ? ? ? ?            ? .
  d????????? ? ? ? ?            ? ..
  -????????? ? ? ? ?            ? fil3.txt
  d????????? ? ? ? ?            ? l3
  ls: cannot open directory l1/l2/l3: Permission denied


ovenstående giver et noget spøjst resultat da "x" mangler i l2 og nedefter.
"cat l1/l2/fil3.txt" er faktisk heller ikke muligt da "+x" mangler på "l2".


Det du har brug for er "+x" i alle directories, dvs. din chmod skal ændres
så den sætter +x på directories , men ikke på filer.
Det kan muligvis klares med et lille script som giver
"a+x" til directories under l1 :

find l1 -type d -exec chmod  a+x {} \;


> 
> Som sædvanligt: Undskyld min meget lange disclaimer, men den slags har jeg ingen indflydelse på:-(

Ellers kunne du jo prøve http://forum.sslug.dk/newsportal




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2009-07-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *