Cov txheej txheem:

Cov lus txib twg hloov cov ntaub ntawv pab pawg tswv?
Cov lus txib twg hloov cov ntaub ntawv pab pawg tswv?

Video: Cov lus txib twg hloov cov ntaub ntawv pab pawg tswv?

Video: Cov lus txib twg hloov cov ntaub ntawv pab pawg tswv?
Video: hloov siab vim mob txaus lawm tub huas xyooj MV 2023 2024, Hlis ntuj nqeg
Anonim

Cov chaw hais kom hloov tus tswv ntawm cov ntaub ntawv, thiab cov lus txib chgrp hloov cov pab pawg. Ntawm Linux, tsuas yog hauv paus tuaj yeem siv chaw rau kev hloov cov tswv cuab ntawm cov ntaub ntawv, tab sis txhua tus neeg siv tuaj yeem hloov pab pawg mus rau lwm pab pawg uas nws koom nrog.

Ntawm no, kuv yuav hloov tus tswv ntawm cov ntawv tais ceev tseg hauv ib pab pawg li cas?

Yuav Ua Li Cas Hloov Pab Pawg Cov Tswv Cuab ntawm Cov Ntaub Ntawv

  1. Ua tus superuser lossis ua lub luag haujlwm sib npaug.
  2. Hloov cov pab pawg tswv ntawm cov ntaub ntawv los ntawm kev siv chgrp hais kom ua. $ chgrp pawg filename. pab pawg. Qhia cov npe pab pawg lossis GID ntawm pawg tshiab ntawm cov ntaub ntawv lossis cov npe. npe file.
  3. Xyuas kom tseeb tias pawg tswv ntawm cov ntaub ntawv tau hloov lawm. $ ls -l npe.

Kuj Paub, Kuv yuav hloov tus tswv ntawm cov ntaub ntawv hauv Unix li cas? Yuav hloov tus tswv ntawm cov ntaub ntawv li cas

  1. Ua tus superuser lossis ua lub luag haujlwm sib npaug.
  2. Hloov tus tswv ntawm cov ntaub ntawv los ntawm kev siv cov lus txib chown. # chown tshiab-tus tswv filename. tus tswv tshiab. Qhia meej tus neeg siv lub npe lossis UID ntawm tus tswv tshiab ntawm cov ntaub ntawv lossis cov npe. npe file.
  3. Xyuas kom tseeb tias tus tswv ntawm cov ntaub ntawv tau hloov lawm. # ls -l npe.

Yog li ntawd, kuv yuav hloov tus tswv ntawm daim nplaub tshev thiab pab pawg hauv Linux li cas?

Rau hloov tus pawg tswv cuab ntawm ib cov ntaub ntawv los yog phau ntawv invoke chgrp hais kom ua raws li qhov tshiab pab pawg npe thiab lub hom phiaj cov ntaub ntawv raws li kev sib cav. Yog tias koj khiav qhov kev hais kom ua nrog tus neeg siv tsis tsim nyog, koj yuav tau txais "Kev Ua Haujlwm tsis tso cai" yuam kev. Txhawm rau txhawm rau qhov tsis raug, khiav cov lus txib nrog qhov kev xaiv -f.

Leej twg tuaj yeem nkag mus rau cov ntaub ntawv nrog kev tso cai 000?

Yog ntaub ntawv /dir muaj permissions 000 , ces tsuas yog hauv paus ua tau ua tej kev hloov rau qhov ntawd ntaub ntawv . Tsis yog tus tswv lossis lwm tus ua tau ua tej yam kev hloov. Tus tswv ua tau tsis txawm nkag mus tus ntaub ntawv /dir lossis rho tawm tib yam. Yog li hauv koj qhov piv txwv: Cov ntaub ntawv nrog 000 tso cai tau nkag tau [nyeem/sau] los ntawm hauv paus.

Pom zoo: