大网数据广告活动
网站运营与故障问答

Create FTP/SSH account with read-only access in DirectAdmin

· 52CE 我爱测

I have a developer who wants to check website files on the server. In the past, this developer has made changes that broke the website. In order to avoid unwanted file editing, I need to grant the developer access in some sort of…

问题原文

原帖链接 · Els den Iep · CC BY-SA 4.0

I have a developer who wants to check website files on the server. In the past, this developer has made changes that broke the website. In order to avoid unwanted file editing, I need to grant the developer access in some sort of read-only role. The hosting is on DirectAdmin.

Question is: How can I create a FTP/SSH user with read-only (and perhaps download) credentials?

已采纳解答

原帖链接 · Els den Iep · CC BY-SA 4.0

SOLVED

Create .ftpaccess file in directory that needs to be read-only for account [email omitted].

Content of the .ftpaccess file:

<Limit WRITE>
DenyUser [email omitted]
</Limit>

That's all.

Please note:

  • Commands in .ftpaccess file are recursive (i.e. affects all the files in the current directory and any subdirectory).

  • Condition is that server supports ProFTPD.

More about ProFPTD here:

http://www.proftpd.org/docs/howto/Limit.html

Warning: ProFTPD is quite powerful. If you make a mistake and therefor you can't edit your files via FTP anymore, you can still edit .ftpaccess file via the command line.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2019-12-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。