Please don't mark it as duplicated. I've tried a lot but can't make it working.
我已经使用 tasksel 安装了 LAMP。一切正常,但出现文件权限错误(在安装 WordPress 时出现此错误“抱歉,我无法编写 wp-config.php 文件。”)
我可以手动创建文件,但我不想这样做。我不是为了让它正常工作。
安装灯后我做了什么设置权限
cd /var/wwww/
sudo chown -R username:www-data /var/www/html/
sudo chmod 775 /var/www/html/
sudo chmod g+s /var/www/html/
后来我尝试了一些sudo chown -R [USER NAME]:[USER NAME] /var/www我在 askubuntu 上找到的解决方案。
我对盲目尝试解决方案的权限问题知之甚少。
你能帮我解决这个问题吗?:)
输出ls -l /var/www
Output of total 4
drwxrwsr-x 3 h3mdsa h3mdsa 4096 Jun 12 16:40 html
(感谢@Jos 发表评论)
提前致谢,
Md Al Amin
几天前我安装了 Ubuntu 来擦除 Windows。现在 Ubuntu 正在使用整个硬盘。
当我运行 fdisk -l 结果显示如下:
.........
Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 sectors`
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos …Run Code Online (Sandbox Code Playgroud) 14.04 ×1
16.10 ×1
17.04 ×1
apache2 ×1
fdisk ×1
gparted ×1
hard-drive ×1
lamp ×1
mate ×1
partitioning ×1
permissions ×1
unity ×1