Get the App
SLTechnology News&Howtos  ›  Servers  › 

Guide to setting up trampling pits in FreeNas (2)

Shulou Source: shulou.com Published: 2022-06-02 11:33:58 10月03日 Update

0x00 permission configuration

Configure user groups and permissions after FreeNas is completed, add Samba shares (Windows mode) after new users and user groups are created, and cannot accurately control permissions. Try to modify permissions in the system and prompt "Operation not permitted".

Cause of 0x01 problem

FreeNas is based on Unix. Creating Samba shares with windows permissions causes confusion of permissions.

0x02 solution

Do not configure folder permissions in Unix, log in through the samba service using the directory owner account, and modify permissions in folder options

For example, the owner and group members have full permissions, and others cannot open them (equivalent to 770 permissions of linux and unix). Just cancel all permissions of everyone or delete everyone directly.

0x02 test results

After the modification is completed, use the ls-l command from the FreeNas command line to view the directory, and you can see that the permissions of the directory have been changed to 770

Introduction to linux and unix permissions in 0x03 Appendix

Drwxr-xr-x 2 root root 4096 September 25 21:41 bin/

Drwxr-xr-x 3 root root 4096 September 25 21:41 boot/

Drwxr-xr-x 2 root root 4096 September 25 21:38 cdrom/

Drwxr-xr-x 17 root root 4180 December 2 11:48 dev/

Ten digits are used on the first line to indicate the permissions and types of the file.

The first of these, which is used to represent the type of file, is:

-: represents an ordinary file

D: represents a catalog file

L: represents a symbolic link file

F: indicates a named pipeline

S: represents a socket file

C: represents a character device, which is common in drivers

B: indicates the block device

The last nine are divided into three groups, namely, user rights, user group permissions and other user rights.

In these three sets of representations, the first two represent the same, indicating readable and writable permissions, respectively, and r and w represent

A special place exists in the third place. In general, we see that the third place is often x or-this

Represents an executable permission.

This article is reproduced from my blog http://kiros.onbeta.com/Unix/FreeNas-da-jian-cai-keng-zhi-nan-er.html

Tags: Permissions files users directories user groups configurations commands owners folders types devices do not ordinary famous special chaotic one line three blog reason Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Linux Shulou Tech Info Huawei NVidia