如何在 Apache 服务器上为用户创建只读 FTP 访问?
我有一个网站,里面有很多摄影页面。为了允许访问者下载一组照片,而不必单独保存每张照片,我想创建一个公开的只读 FTP 用户。
通过主机的控制面板,我可以创建“常规”FTP 用户帐户,但它们具有写入权限,这是不可接受的。
由于同一服务器上托管有多个域和子域,我不想使用匿名 FTP - 只读 FTP 帐户应限制到特定目录/子目录。
如果可能的话,我还想知道如何从我授予该新用户的只读 FTP 访问权限中排除特定目录。
我查看了服务器上所有用户帐户信息的存储位置,但无济于事。具体来说,我查看了 httpd.conf,并找到了 LoadModule proxy_ftp_module module/mod_proxy_ftp.so,但我不知道如何使用它(或者它是否相关)。
I have a web site with lots of pages of photography. In order to allow visitors to download groups of photos without having to save each one individually, I want to create a read-only FTP user that will be publicly available.
Via the control panel for the host, I can create "regular" FTP user accounts, but they have write access, which is unacceptable.
Since there are several domains and subdomains hosted on the same server I don't want to use anonymous FTP -- the read-only FTP account should be restricted to a specific directory/sub-directories.
If possible, I would also like to know how to exclude specific directories from the read-only FTP access I grant to this new user.
I've looked all over on the server to find where user account info is stored to no avail. Specifically I looked in httpd.conf, and found LoadModule proxy_ftp_module modules/mod_proxy_ftp.so, but I don't know how to go about working with it (or if it's even relevant).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用 FTP 的原因似乎是为了让人们同时下载许多照片。
您也可以使用标准 Apache HTTP 访问控制来提供 zip 文件的链接。这样,使用纯 HTTP 就可以消除您提到的人们删除或覆盖您的文件的特定风险。
您可以创建一个目录来提供要下载的 zip 文件的索引
,并对其余目录应用标准权限
It seems like your reason for using FTP is to let people download many photographs at once.
You can just serve links to zip files too, using standard Apache HTTP access control. This way the specific risk of people deleting or overwriting your files, which you mentioned, is eliminated by using plain HTTP.
You can make one directory to provide an index of the zip files to download
And apply standard permissions to the rest of your directories