惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Last Watchdog
The Last Watchdog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Secure Thoughts
MongoDB | Blog
MongoDB | Blog
博客园 - Franky
T
Tor Project blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
博客园_首页
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Vercel News
Vercel News
Last Week in AI
Last Week in AI
月光博客
月光博客
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
博客园 - 叶小钗
NISL@THU
NISL@THU
C
Check Point Blog
K
Kaspersky official blog
N
News and Events Feed by Topic
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
Arctic Wolf
T
Threatpost
GbyAI
GbyAI
L
LINUX DO - 热门话题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy & Cybersecurity Law Blog
N
News and Events Feed by Topic
Scott Helme
Scott Helme
P
Privacy International News Feed
The Register - Security
The Register - Security
G
GRAHAM CLULEY
Recorded Future
Recorded Future
Apple Machine Learning Research
Apple Machine Learning Research
C
Cybersecurity and Infrastructure Security Agency CISA
B
Blog
Project Zero
Project Zero
Cyberwarzone
Cyberwarzone
Webroot Blog
Webroot Blog
Microsoft Security Blog
Microsoft Security Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
D
DataBreaches.Net
J
Java Code Geeks
AWS News Blog
AWS News Blog
Help Net Security
Help Net Security
Engineering at Meta
Engineering at Meta
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
Google DeepMind News
Google DeepMind News

博客园 - 懒人ABC

Docker 国内镜像源加速列表(转载,真实可用)-https://zhuanlan.zhihu.com/p/1914353637645345944 windows10操作系统下安装facefusion实现视频换脸(windows server不支持哈) 用spark3.5.2+scala2.13.11+JDK17统计文件单词词频 DeepSeek与Elasticsearch结合,可以通过AI模型增强搜索、分析和自动化能力,实现更智能的数据处理(含订单备货和库存预警案例) 配置navicat客户端通过ssl连接windows server 2025的sqlserver2022数据库服务器 在debain下安装思源黑体(Source Han Sans)的注意点 PHP处理建行数币支付的几种情况 windows10下编译php扩展 获取工作表的名称 获取名称管理器里名称应用的所有单元格 spreadsheet 获取名称管理器 十三、Vue中的computed属性 十二、react-reudx之@connect 摆脱redux的繁琐操作 十一、微信小程序-var、let、const用法详解 十、es6之扩展运算符 三个点(...) 九、小程序 Redux详解与在小程序中怎么使用(action和reducers) 八、wepy代码规范 七、Flex 布局 六、页面跳转和路由
sftp配置多个用户权限的问题
懒人ABC · 2019-12-17 · via 博客园 - 懒人ABC

groupadd group1

chmod 0755 /test/
useradd -g group1 -d /test/backend/ -M test_backend
usermod -s /sbin/nologin test_backend
passwd test_backend
xxxxxxxx

useradd -g group1 -d /test/api/ -M test_api
usermod -s /sbin/nologin test_api
passwd test_api
xxxxxx

useradd -g group1 -d /test/business/ -M test_business
usermod -s /sbin/nologin test_business
passwd test_business
xxxxxx

UseDNS no
AddressFamily inet
SyslogFacility AUTHPRIV
PermitRootLogin yes
PasswordAuthentication yes

# override default of no subsystems
# Subsystem sftp /usr/libexec/openssh/sftp-server
Subsystem sftp internal-sftp

Match User test_backend
ChrootDirectory /test/backend
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
Match User test_api
ChrootDirectory /test/api
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
Match User test_business
ChrootDirectory /test/business
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp

systemctl restart sshd

这里有几点

1、主目录的所有者必须为root

即 chown root:root /test

2、权限为chmod 755 /test

3、要想让sftp修改子目录,只能创建子目录来设置权限

mkdir /test/api/project01

chown test_api:group1 /test/api/project01

chmod 755 /test/api/project01