Công cụ này chuyển đổi qua lại giữa quyền truy cập file dạng số và dạng ký hiệu trong Linux, ví dụ 755 tương ứng rwxr-xr-x. Bạn bật tắt từng ô quyền đọc, ghi, thực thi cho ba nhóm chủ sở hữu, nhóm và người khác, rồi nhận về cả mã octal lẫn câu lệnh chmod sẵn để dán vào terminal.
Cách tính rất đơn giản: mỗi nhóm quyền là tổng của đọc (4), ghi (2) và thực thi (1), nên quyền cao nhất là 7 và thấp nhất là 0. Với thư mục, quyền thực thi mang ý nghĩa khác là quyền đi vào bên trong, nên thư mục thường cần 755 chứ không phải 644 dù nội dung bên trong không cần chạy.
Cách sử dụng
- Tích chọn các ô quyền đọc, ghi, thực thi cho chủ sở hữu, nhóm và người khác.
- Xem mã octal và ký hiệu được cập nhật ngay bên cạnh.
- Kiểm tra xem file là thư mục hay tệp thường để chọn mức quyền phù hợp.
- Sao chép lệnh chmod và chạy trên máy chủ của bạn.
This calculator converts between octal and symbolic Linux file permissions, so 755 maps to rwxr-xr-x. Toggle read, write, and execute for the owner, group, and other classes, then get both the octal value and a ready-to-paste chmod command you can copy straight into a terminal. It also works in reverse if you paste an existing symbolic string.
The maths is simple: each class scores read as 4, write as 2, and execute as 1, giving a maximum of 7 and a minimum of 0. For directories, execute means something different, namely permission to enter and traverse the folder, which is why directories normally use 755 rather than 644 even when nothing inside needs to run.
How to use
- Tick the read, write, and execute boxes for owner, group, and other.
- Watch the octal value and symbolic string update beside the checkboxes.
- Decide whether the target is a directory or a regular file to pick sensible permissions.
- Copy the chmod command and run it on your server.