Monu Tools

chmod-laskuri

Muunna Unix-tiedosto-oikeuksia valintaruutujen, oktaalin (kuten 755) ja symbolisen merkinnan (kuten rwxr-xr-x) valilla.

Nain kaytat tyokalua chmod-laskuri

  1. 01

    Rastita luku-, kirjoitus- ja suoritusruudut omistajalle, ryhmalle ja muille.

  2. 02

    Tai kirjoita oktaaliarvo kuten 755 asettaaksesi ruudut automaattisesti.

  3. 03

    Kopioi valmis chmod-komento.

What Unix permissions are

Unix file permissions control who can read, write and execute a file or directory, split across three groups: the owner, the group, and everyone else. This calculator converts between interactive checkboxes, the numeric octal form like 755, and the symbolic form like rwxr-xr-x, keeping all three in sync.

How the numbers work

Each group gets three bits, read (4), write (2) and execute (1), and you add them up to get one digit. So 7 is read plus write plus execute (rwx), 5 is read plus execute (r-x), and 6 is read plus write (rw-). Three digits, one per group, give you the familiar permission number.

Common values worth knowing

The common values are worth memorizing. 755 suits directories and executables: the owner has full access while group and others can read and execute but not write. 644 suits normal web files: the owner can read and write, everyone else can only read.

For sensitive files, 600 keeps things tight: only the owner can read or write, and nobody else has any access, which is what SSH private keys and similar secrets need.

Special bits and the fourth digit

There is also an optional fourth leading digit for special bits, setuid, setgid and the sticky bit, which change how programs run or how a shared directory behaves. When one is set, the execute position shows as s or t instead of x.

How to use the output

The calculator gives you the ready-to-run chmod command to copy, and runs entirely in your browser. It is a reference and converter, so it does not change any files itself.

Usein kysytyt kysymykset

Mita 755 ja 644 tarkoittavat?

755 antaa omistajalle taydet oikeudet ja kaikille muille luvun ja suorituksen, kaytetaan hakemistoille ja skripteille. 644 antaa omistajalle luvun ja kirjoituksen ja kaikille muille vain luvun, kaytetaan tavallisille tiedostoille.

Mita 777 tarkoittaa ja onko se turvallista?

777 myontaa luvun, kirjoituksen ja suorituksen kaikille. Se on lahes aina turvatonta palvelimella, koska kuka tahansa kayttaja voi muokata tiedostoa. Suosi sen sijaan 755:ta tai 644:ää.

Miten teen tiedostosta suoritettavan?

Lisaa suoritusbitti. Arvosta 644 siirtyisit arvoon 755 (tai chmod +x), mika kytkee suorituksen paalle omistajalle, ryhmalle ja muille.

Mika ero on symbolisella ja oktaalimerkinnalla?

Oktaali (kuten 755) koodaa oikeudet numeroina, kun taas symbolinen (rwxr-xr-x tai u+x) kuvaa ne kirjaimina. Tama tyokalu nayttaa molemmat ja pitaa ne synkronissa.

Mita ovat setuid, setgid ja sticky-bitti?

Ne ovat neljas etunumero. Setuid ja setgid suorittavat ohjelman sen omistajana tai ryhmana, ja hakemiston sticky-bitti estaa kayttajia poistamasta toistensa tiedostoja (kuten /tmp:ssa).

Miksi suoritusbitti naytetaan muodossa s tai t?

Kun setuid, setgid tai sticky-bitti on asetettu, suorituspaikka naytetaan muodossa s tai t x:n sijaan ilmaisemaan, etta erikoisbitti on aktiivinen.

Lähteet

Upota tämä työkalu

Lisää tämä työkalu omalle verkkosivustollesi. Kopioi alla oleva koodinpätkä, niin se pysyy ajan tasalla automaattisesti.

<iframe src="https://monu.tools/embed/fi/chmod-calculator" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

Liittyvat tyokalut