Lus qhia: Muaj cov ntawv qhia sib qhia ntawm cov neeg siv ntau yam hauv Linux

Terminal

Hnub no kuv rov qab los nrog lwm tus ntsis, uas, kuv siv ntau: yuav tuaj yeem muaj cov ntawv qhia sib qhia nyob ntawm ob peb cov neeg siv ntawm lub LinuxCov. Kuv muab lawv rau qhov xwm txheej, nrog kuv tus poj niam hauv tsev wb ob leeg siv tib lub PC nrog Arch Linux tab sis txhua tus nrog nws tus kheej cov neeg siv. Yog li, peb pom qhov teeb meem nrog cov nplaub tshev uas peb faib xws li cov suab paj nruag lossis duab, txij li txhua tus nyias muaj nws cov ntaub ntawv, theej tawm yam.

Nws yog thaum ntawd peb xav tias ua cov ntaub ntawv sib qhia, tab sis qhov ntawd yog qhov teeb meem ntawm kev tso caiCov. Yog tias tus ntawv tais ceev tseg yog kuv li nws tsis pom, yog tias cov ntaub ntawv yog tsim los ntawm kuv, nws tsis rho tawm nws thiab lwm yam. Thaum pib, lub thaj yog tias peb tau muab 777 kev tso cai rau cov ntaub ntawv no txhua zaus peb hloov kho tej yam rau lwm tus kom txog thaum peb pom qhov kev daws teeb meem, Pab pawg hauv kev tso cai!

Tso cai rau pawg yog dab tsi?

Yog qhov zoo tshaj plaws, muab cov ntaub ntawv tso rau ntawd thiab txhua cov ntsiab lus ib pawg tshwj xeeb nrog nyeem thiab sau tso cai, uas txhua tus tswvcuab hauv pawg yuav muaj kev nkag mus tau hais qhia cov npe. Qhov no ces tso cai rau los ntawm kev ntxiv peb cov neeg siv hais rau pab pawg xwb peb tuaj yeem twb cuam tshuam hauv cov npe ntawd.

Thiab yuav ua li cas kuv hloov nws?

Nov yog qhov zoo tshaj plaws thiab kuv mus qhia koj li cas kuv tau ua nrog kuv tus poj niam. Thawj qhov yog tsim cov ntawv ntawd, uas piv txwv kuv yuav hu rau «qhia tawm".

sudo mkdir /home/compartido

Kuv tsim nws sab hauv / tsev thiab sab nraud ntawm peb tus lej nyiaj, kom tsis txhob muaj cov ntawv sau npe sab saud cuam tshuam nrog lawv tus kheej kev tso cai. Tam sim no peb yuav tsum tsim cov pab pawg, uas peb yuav muab tso «sib koom»

sudo groupadd compartidos

Thiab peb muab cov pab pawg no rau cov npe uas peb tsim ua ntej thiab peb kuj tau hloov cov kev tso cai, yog li txhua yam peb tsim sab hauv, tsis hais lawv cov npe lossis cov ntaub ntawv, kuj yog koom nrog pawg no.

sudo chgrp -R compartidos /home/compartido
sudo chmod g+s dirname

Tsis tas li, peb yuav tsum ntxiv peb cov neeg siv rau nws. Tom qab ntawd peb yuav tsum rov ua qhov lus txib no rau txhua tus:

sudo usermod -G compartido sebastian
sudo usermod -G compartido mimujer

Txog tam sim no, peb muaj cov ntawv qhia tseg «/ tsev / qhia tawm»Uas zwm rau cov pab pawg«sib koom«, Nrog dab tsi txhua tus tswvcuab cov neeg siv ntawm ib tus neeg yuav muaj peev xwm lees paub thiab txhua yam tsim nyob hauv cov ntawv, yuav koom nrog cov pab pawg nrog dab tsi ib qho ntawm peb yuav pom tau lawv.

Tam sim no peb tsuas xav tau ib theem kawg, uas tej zaum yuav xaiv tau, tab sis nws yog kom hloov umask ntawm cov neeg siv, kom ntseeg tau tias txhua cov ntaub ntawv tshiab uas peb tsim yog hloov kho los ntawm lwm tus tswv cuab ntawm cov pab pawg. Qhov no cuam tshuam rau tus neeg siv tag nrho, tsis yog cov npe xwb, yog li lawv tau pom tias nws ua haujlwm rau lawv lossis tsis. Hauv kuv qhov xwm txheej, vim tias tsuas yog kuv tus pojniam thiab kuv siv lub system xwb, nws tsis thab peb thiab peb tso ib tus neeg umask rau ntawm 002, uas txhais tau tias txhua cov ntaub ntawv tsim pib nrog 775 kev tso cai.

Kho cov umask

Txhawm rau hloov kho umask, hauv txhua tus neeg siv koj yuav tsum hloov kho .profile lossis .bashrc ntawv uas nyob sab hauv tus neeg siv lub tsev thiab hloov kho tus nqi ntawm umask los ntawm tus naj npawb xav tau. Yog tias qhov kev xaiv tsis nyob ntawd, peb yuav tsum ntxiv nws.

Koj tseem tuaj yeem hloov kho / / etc / profile file kom qhov pauv hloov yuav cuam tshuam rau txhua tus neeg siv

Yog li, hauv console peb muab tso:

sebastian@multivacs ~> vim .profile

Thiab peb yuav pom qee yam zoo li no:

vi-profile 2

Yog li, peb mus rau kab ntawv uas hais tias umask, peb nias tsab ntawv i txhawm rau hloov thiab tshem tus # tshem tawm cov saib. Peb hloov tus naj npawb rau 002. Yog tias kab tsis tshwm, lawv yuav tsum tau ntxiv nws.

Tom qab ua tiav, peb nias tus yuam sij Esc kom tawm cov hloov kho hom thiab tom qab ntawd peb sau :+q+wCov. Dab tsi ua rau peb txuag qhov kev hloov pauv thiab tawm ntawm Vi.

Nws yuav zoo li cov duab no:

vi-profile tau

Thiab tus ntawd yog nws! Yog tias lawv kaw lawv cov neeg siv rooj sib tham thiab rov qhib nws, qhov kev hloov pauv yuav raug coj los siv, uas cov ntawv qhia chaw yuav raug ua haujlwm.


Cov ntsiab lus ntawm tsab xov xwm ua raws li peb cov ntsiab cai ntawm kev tswj hwm kev ncaj nceesCov. Tshaj tawm ib qho yuam kev nyem no.

28 lus, tawm koj li

Tso koj saib

Koj email chaw nyob yuav tsis tsum luam tawm.

*

*

  1. Lub luag haujlwm rau cov ntaub ntawv: Miguel Ángel Gatón
  2. Lub hom phiaj ntawm cov ntaub ntawv: Tswj SPAM, kev tswj xyuas tawm tswv yim.
  3. Sau raws cai: Koj kev tso cai
  4. Kev sib txuas lus ntawm cov ntaub ntawv: Cov ntaub ntawv yuav tsis raug xa mus rau lwm tus neeg thib peb tsuas yog los ntawm kev txiav txim siab raug cai.
  5. Cov ntaub ntawv khaws cia: Cov Ntaub Ntawv khaws tseg los ntawm Occentus Networks (EU)
  6. Txoj Cai: Txhua lub sijhawm koj tuaj yeem txwv, rov qab thiab tshem tawm koj cov ntaub ntawv.

  1.   elav ua said

    Ntsis zoo kawg.

  2.   KZKG ^ Gaara said

    Zoo heev.

    Ntau xyoo dhau los kuv pom qhov yuav tsum tau ua qhov no ntawm kuv tus kheej, qhov kuv tsis paub yog umask ... Kuv hloov tso ib txoj haujlwm hauv pob zeb 🙂

    Tsaug rau qhov taub

    1.    thalskart said

      Yog, crontab kuj zoo heev. Koj tau muab dab tsi, tso 775 tso cai rau cov ntsiab lus?

  3.   nyoosBasic said

    Zoo kawg ntsis .. ..saved yog tias tsim nyog;) ..

  4.   Luis said

    Ok, koj tsim daim nplaub tshev / tsev / qhia tawm thiab muab cov pab pawg "qhia tawm" rau nws tab sis

    Tus neeg siv twg yog tus nplaub tshev no? Tus ntawd yog leej twg yog tus tswv? Kuv, lwm tus neeg, lossis tus neeg siv lub hauv paus uas nws tus account tsis xiam vim kuv siv sudo?

    Ntawm qhov tod tes, Kuv pom kuv tus kheej nrog cov teeb meem hauv qab no: cov ntaub ntawv uas kuv tsim tsis tuaj yeem raug tshem tawm los ntawm lwm tus neeg thiab cov ntaub ntawv uas lwm tus tsim kuv yuav tsis rho tawm kuv tus kheej.

    Kuv ua dab tsi txhaum?

    1.    thalskart said

      Thaum tsim cov ntawv tais ceev tseg nrog sudo, koj yuav tsum sab laug nrog tus neeg siv lub hauv paus ua tus tswv. Koj tuaj yeem hloov kho qhov ntawd nrog chown hais kom ua haujlwm rau lwm tus siv.

      Ntawm lwm qhov, xyuas tias cov ntaub ntawv koj tsim tau ua nrog 775 kev tso cai (uas muab umask 002). Yog tias lawv tsis muaj cov kev tso cai, tej zaum yuav muaj qee qhov tsis raug.

      Ib yam li ntawd, nws tsim nyog qhia meej tias lub umask cuam tshuam txhua yam ntaub ntawv tshiab uas tsim nyob rau hauv cov ntawv qhia, tab sis yog tias lawv tsiv los lossis luam cov ntsiab lus los ntawm lwm qhov chaw, cov ntawv tso cai qub raug tswj hwm thiab tsis yog cov uas peb tau teeb tsa hauv cov ntawv.

      1.    Luis said

        Hav Koj hais raug kawg.

        Kuv tau saib thiab qhov teeb meem yog tshwm sim los ntawm qhov kawg koj hais: Thaum tsiv ib cov ntaub ntawv los ntawm lwm qhov chaw mus rau cov ntawv qhia ua ke, cov ntawv tso cai qub raug tswj hwm.

        Puas muaj kev los kho qhov no?

        Kuv tuaj yeem siv hlaws.

      2.    thalskart said

        Ua li ntawd, qhov zoo tshaj plaws yuav yog tso ib crontab zoo li KZKG ^ Gaara tau hais, uas koj tuaj yeem tso lus txib xa cov pab pawg thiab cov kev tso cai rau lub nplaub tshev cov ntsiab lus txhua txhua X lub sijhawm.
        Ntawd yog hais ib yam zoo li no hauv daim crontab:
        sudo chgrp -R compartidos /home/compartido/*
        chmod -R 775 /home/compartido/*

        Txhawm rau txhua yam tshiab, tsiv mus rau Pawg Koom Nrog nrog kev tso cai 775.

      3.    thalskart said

        Tsis quav ntsej tus * tom kawg ntawm txhua kab, Kuv tau xav txog lwm yam thaum kuv tso 😛

      4.    Luis said

        Ua tsaug phooj ywg.

  5.   Ernesto said

    Cov ntawv zoo heev, tab sis kuv nyiam kom muaj kev sib cais, qhov uas kuv tuaj yeem tso txhua yam uas kuv xav qhia. Kuv muaj lub siab dawb 500 GB disk, nyob rau hauv uas kuv siv 100GB nrog Linux thiab 400GB muab faib (ntfs) nyob rau hauv uas yog txhua lub suab paj nruag, duab, thiab lwm yam ... Ntawm kuv lub pc peb yog ob tus neeg siv thiab txhua tus tuaj yeem nkag tau rau muab faib ntfs. thiab muab tso thiab tshem tawm qhov peb xav tau, thaum peb xav tau. Yog tias kuv tsis xav qhia ib qho twg, kuv muaj qee yam hauv kuv lub npe username. 🙂

    1.    Luis said

      Tam sim no, nws yog lwm txoj hauv kev los ua nws tab sis cov teeb meem tsis yog qhov twg los tso cov ntaub ntawv tab sis los kho cov kev tso cai thiab tswj kev nkag mus ntawm cov neeg siv sib txawv.

      Koj tuaj yeem muaj nws ntawm NTFS kev faib tawm, kho kom raug tab sis koj tseem muaj cov ntawv ua kom tawg, qeeb dua EXT4 thiab tsawg dua kev ruaj ntseg, txawm tias yog qhov zoo rau koj kom muaj nws li ntawd nws yog qhov siv tau.

  6.   rainerhg ua said

    Ywm! Cov lus qhia zoo, tab sis kuv tseem yuav ntxiv ib txoj haujlwm los hloov cov kev tso cai rau 775 ntawm cov ntawv tshiab ntawm txhua qhov pib ntawm kev sib kho, thiab nws yuav daws tau cov teeb meem ntawm cov ntaub ntawv tsiv los ntawm lwm lub nplaub tshev.
    Tsis tas li, ua tsaug ntau rau sib koom!

  7.   Joaquin said

    Lus hauv no teb Nthuav, tsaug!

  8.   Anonymous said

    Kuv tabtom tsa qee yam hais txog kev sib koom nrog pab pawg ntawm qee cov gnu / linux faib tawm. Qee qhov distros tsim cov neeg siv nrog cov pab pawg thawj pawg thiab tsis siv thawj pab pawg sib luag ntawm tus neeg siv lub npe.
    Qhov txawv yog tias siv cov pab pawg thawj pawg, los ntawm lub neej ntawd txhua yam yog qhia nrog cov pab pawg neeg siv uas txhua tus neeg siv tsim nyob rau hauv ntawd distro yuav muaj, yog tias hloov lawv tsim nrog tib pab pawg raws li tus neeg siv lub npe, los ntawm neej ntawd tsis tsis muaj dab tsi. yuav tau qhia.

    Piv Txwv:
    $ ls -l / home/user/*.txt
    -rw-r - r– 1 carlos carlos 126 Mar 25 2012 notes.txt

    $ ls -l / home/user/*.txt
    -rw-r - r– 1 carlos cov neeg siv 126 Mar 25 2012 notes.txt

    Kuv tsis pom zoo kom siv cov thawj pawg pab pawg, zoo dua los tsim koj tus kheej pawg thawj pawg thaum tsim tus neeg siv.

    #txhobdab neeg carlos
    # sivradd -g carlos -G lp, log, uucp, audio, cdrom, cdrw, usb, lpadmin, plugdev -m -s / bin / bash carlos

    The -g carlos qhia txog kev siv niam txiv pab pawg carlos.
    Koj tuaj yeem hloov thawj pab pawg ntawm tus neeg siv nrog # usermod -g tab sis qhov ntawd yuav tsis hloov thawj pab pawg ntawm txhua cov ntaub ntawv thiab cov ntawv uas twb nyob hauv / tsev / carlos, koj yuav tsum hloov lawv txhua tus.

    Piv txwv li: hloov thawj pab pawg ntawm cov neeg siv cov carlos rau thawj pab pawg carlos thiab tom qab ntawd hloov
    tag nrho cov ntaub ntawv thiab cov nplaub tshev kev tso cai ntawm tus neeg siv carlos kom lawv nyob twj ywm los ntawm carlos carlos.

    #txhobdab neeg carlos
    # usermod -g carlos cov neeg siv
    # cd / tsev
    # chown -R carlos: carlos carlos

    Hais txog kev sib faib khoom, koj tuaj yeem tsim tus neeg siv hu ua sib koom nrog koj pab pawg sib koom ua ke, thiab kom tsis muaj teeb meem tso cai thaum luam, koj thawj pauv tus neeg siv
    nrog "$ su - sib qhia" ces qhov koj xav tau yog theej rau / tsev / qhia tawm, nrog rau qhov no thiab cov kev tso cai ntawm dab tsi theej yuav dhau los ua cov neeg siv sib koom.
    Yog tias twb muaj cov ntaub ntawv theej rau lwm tus siv thiab thawj pab pawg, koj yuav tsum hloov lawv txhua tus.

    # cd / tsev
    # chown -R qhia tawm: sib qhia

    Tsuas yog tshuav qee yam tseg hauv limbo, uas kuv tsis paub yuav ua li cas luam cov ntawv raws li tus neeg siv sib koom, uas yog, tsis tas yuav ua $ su - sib qhia

  9.   Anonymous said

    Nws yog qhov ua dag heev kom luam tawm ntawm kab, hehe, Kuv siv pcmanfm ntawm no hauv openbox, tab sis koj tuaj yeem siv tus thawj tswj hwm cov ntaub ntawv koj muaj lossis xav tau, nws tsuas yog tua ua tus siv sib koom thiab tsis yog tus neeg siv hauv paus.

    $ su - sib qhia
    $ pcmanfm ib
    $ ntses taub ntswg ntev
    $mc
    thiab lwm yam

    1.    thalskart said

      Kuv tsuas yog yuav los teb cov lus ntawd xwb. Yog tias tsis yog, lwm tus yog tus crontab uas hloov pauv tus tswv ntawm cov ntaub ntawv txhua x nrog lub sijhawm
      chown -R compartido:compartido compartido

  10.   Hugo said

    Nws zoo li rau kuv tias qhov hais kom ua "usermod -G thenewgroup elusuario" qhov nws ua yog yeej hloov tus neeg siv pab pawg rau "thenewgroup". Txhawm rau ntxiv rau cov neeg siv rau hauv pawg tshiab, kuv xav tias qhov raug yog "usermod -aG elnuevogrupo elusuario"

    Ib qho ntxiv yog tias kuv pom ntawm no tias ntau tus neeg pom zoo kom ua "chmod -R 775" tab sis qhov ntawd tsis tsuas yog cuam tshuam rau phau ntawv sau npe, tab sis kuj yog txhua cov ntaub ntawv (ua rau lawv ua tiav), uas qhia txog kev pheej hmoo tsis tsim nyog. Zoo dua uas ua ib yam dab tsi zoo li «nrhiav / tsev / qhia tawm -type d -print0 | xargs -0 chmod 755 "thiab yog tias tsim nyog nrog cov ntaub ntawv koj tuaj yeem ua qee yam zoo sib xws tab sis siv" -type f "thiab tso cai 664.

    Thaum kawg, ib txoj hauv kev kom tau ntau lub account tau nkag mus rau cov ntaub ntawv lossis cov ntawv khaws tseg txawm hais tias tus tswv lossis pab pawg twg yog los ntawm kev siv "setfacl" uas yog nyob hauv pob acl (yog tias kuv nco qab kom raug). Nws siv tau zoo piav qhia nyob rau ntawm phau ntawv nplooj.

  11.   Unai martin said

    Kuv muaj cov teebmeem nram qab no. Kuv tau tsim 4 tus neeg siv (web1, web2, web3, web4) thiab kuv xav tau tsim cov pab pawg nkag mus rau cov neeg siv cov pab pawg. Thaum kuv tsim .htaccess cov ntaub ntawv Kuv paub tias kuv yuav tsum tso yuav tsum siv cov neeg siv tau, tab sis yog tias kuv tso yuav tsum siv cov neeg siv web1 web2 web3 web4 kom lawv tuaj yeem nkag mus rau nplaub tshev nrog lawv lo lus zais, thaum kuv sim nkag mus hauv daim nplaub tshev nws Nug kuv rau tus neeg siv thiab tus lej cim ntawm txhua tus. Kuv yuav ua li cas thiaj nug tsuas yog siv tus username thiab password ntawm tus uas xav nkag mus? vim tias nws tau kwv yees tias ib qho tsis paub txog lo lus zais ntawm lwm tus.

  12.   Gustavo F. Paredes said

    Nyob zoo.

    Lub davhlau ya nyob twg 4 yuav tsum muaj "sib koom" ntau tshaj:

    sudo usermod -G sib qhia sebastian

    sudo usermod -G sib qhia kuv poj niam

    Txais tos.

    Gustavo

  13.   Ivan said

    Cheers:

    Peb tau tsiv tawm ntawm Windows Server mus rau CentOs 6 thiab peb tseem nyob hauv kev hloov kho. Kuv cov lus nug: Puas muaj qhov graphical interface hauv CentOs faib cov folders thiab muab nkag rau cov neeg siv hloov kho, kho thiab / lossis tshem tawm cov ntaub ntawv?, Lossis kuv yuav tsum ua txhua yam txheej txheem saum toj no.

    Ua tsaug os XNUMX tug npawg.

    1.    Rafael said

      Kuv tseem tabtom txhim kho ib xus 6 thiab kuv xav siv nws nrog samba uas tso cai rau kuv qhia cov ntaub ntawv los ntawm linux thiab windows, Kuv twb kawm tau me ntsis, Kuv tsis siv linux ntau, tab sis tom haujlwm kuv tau nug, kuv yuav ua li cas ua muab cov folders tab sis nyob hauv hom nraaj ??.

  14.   Ricardo said

    Nyob zoo. Thov pab kuv! ... Nws hloov tawm tias los ntawm kev ua qhov no hauv kuv cov neeg siv hauv linux lub siab, tam sim no kuv ploj txoj cai. Kuv tsis tuaj yeem khiav txhua yam zoo li sudo. Kuv tau txais cov lus nram qab no "Thov zam txim rau kuv, tus neeg siv" lub npe "tsis raug tso cai kom ua" command_to_run "raws li hauv paus hauv" username ""

    Kuv xav tias thaum kuv hloov kuv tus neeg siv rau pawg sib koom, Kuv tau tshem tawm cov cai ntiag tug, thiab tam sim no kuv yuav kho lawv li cas ???

  15.   Guillermo said

    Hav phooj ywg puas muaj ib txoj hauv kev ua ib yam tab sis sib qhia cov ntaub ntawv nrog lwm tus neeg hauv Is Taws Nem

  16.   Fabian said

    Rau qhov no koj yuav tsum siv SAMBA ua File Server. Cheers

  17.   David said

    Nyob zoo. Thaum kuv tau txais mus rau qhov hais kom ua sudo chmod g + s dirname nws qhia kuv tias cov ntaub ntawv lossis cov npe tsis muaj nyob. Koj puas paub qhov teeb meem yog dab tsi?

  18.   Javier Quiroga Almeida: koj puas xav tau ntau tus thwjtim? said

    Kuv yuav tsim ib pab lwm pawg li cas?

  19.   Rodrigo Hernan Ramos said

    Kab:
    sudo usermod -G sib qhia sebastian

    yuav tsum yog:
    sudo usermod -a -G sib qhia sebastian

    thawj txoj kev tshem tawm tus so ntawm tus neeg siv cov pab pawg.
    thiab yog tias koj tawm hws, koj xiam koj txoj cai