At the same time, the POSIXACL shared directory To_manager is used. only the manager user has full permissions on this directory. Other users only have the permission to copy and create files to this directory. However, files cannot be deleted, and files cannot be copied or read. Step: 1. change smb. conf as follows [To_m
POSIX ACL
The shared directory To_manager only has full permissions for the manager user. Other users only have the permission to copy and create files to this directory. However, files cannot be deleted, and files cannot be copied or read.
Steps:
1. change smb. conf as follows:
[To_manager]
Comment = To_manager
Path =/To_manager
Writable = yes
Create mask = 1600
Directory mask = 1600
2. enable Linux to support posix acl (this posix acl function is officially supported on Linux kernel 2.6, and then back-port to 2.4 kernel. ACL can be used in common file systems, such as ext3, xfs, jfs, and ReiserFS. Of course, you must start the ACL when compiling the kernel .)
You can also add the following options to/etc/fstab:
/Dev/sda1/home ext3 acl 1 2
3. write a small script
#! /Bin/bash
Mkdir/To_manager
Chmod 777/To_manager
Chown manager: manager/To_manager
Chmod o + t/To_manager
Setfacl-m d: u: manager: rwx/To_manager
Run the script and restart smb.