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

Proper way of allowing Apache to serve from an encrypted folder (/home dir)

· 52CE 我爱测

I have a folder in my home folder, /home/user/mywebsite . My home folder was encrypted when I installed Ubuntu. I have a symlink in /var/www/fleet -> /home/user/mywebsite . My configuration file: <Directory /var/www/fleet> Option…

问题原文

原帖链接 · tritium_3 · CC BY-SA 3.0

I have a folder in my home folder, /home/user/mywebsite. My home folder was encrypted when I installed Ubuntu. I have a symlink in /var/www/fleet -> /home/user/mywebsite.

My configuration file:

<Directory /var/www/fleet>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
</Directory>

When I try to access, I get 403 forbidden.

apache error.log [Fri Dec 01 16:08:28.100927 2017] [core:error] [pid 23024] [client 192.168.168.9:50328] AH00037: Symbolic link not allowed or link target not accessible: /var/www/fleet

I know it's a permissions issue since I can run this command:

sudo -u www-data ls /var/www/fleet
ls: cannot access /var/www/fleet: Permission denied

what is the correct way to allow serving encrypted folder? Do I add www-data user to my user group?

已采纳解答

原帖链接 · tritium_3 · CC BY-SA 3.0

this question was somewhat posted without a correct understanding of home folder encryption in general.

to be short, there is no possible way to serve from an encrypted folder while the home folder is still encrypted.

so in this case, if the computer was restarted, and apache loads on startup and is trying to read files from an encrytped homefolder, that has yet to be decrypted, it will fail.

the only way is to decrypt the files stored in the home first before trying to access the content.

decryption can be done in a variety of ways. but in short, my question has been answered. closing.

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

资料来源与适用范围

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

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

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