我的目标是用 Composer 安装 Magento
composer create-project --repository=https://repo.magento.com/ magento/project-community-edition magento2
Installing magento/project-community-edition (2.2.6)
In ProjectInstaller.php line 68:
mkdir(): Permission denied
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]
我有一个用户
magento_user@roman-pc:/var/www/html$ groups magento_user
magento_user : magento_user www-data
我有apache2
DocumentRoot /var/www/html
-------------------------------------------------------------------------
magento_user@roman-pc:/var/www/html$ ps aux | grep apache
root 1003 0.0 0.3 499316 30788 ? Ss 15:53 0:00 /usr/sbin/apache2 -k start
www-data 1066 0.0 0.2 501648 17608 ? S 15:54 0:00 /usr/sbin/apache2 -k start
www-data 1067 0.0 0.2 501648 17608 ? S 15:54 0:00 /usr/sbin/apache2 -k start
www-data 1068 0.0 0.2 501648 17608 ? S 15:54 0:00 /usr/sbin/apache2 -k start
www-data 1069 0.0 0.2 501648 17608 ? S 15:54 0:00 /usr/sbin/apache2 -k start
www-data 1070 0.0 0.2 501648 17608 ? S 15:54 0:00 /usr/sbin/apache2 -k start
magento+ 6363 0.0 0.0 14432 1004 pts/0 S+ 17:07 0:00 grep --color=auto apache
不应该www-data
授予我的用户完全权限var/www/html
???
------------------------------------------------------------------
更新
在弄乱了我目前的状态之后
magento_user@roman-pc:/var/www/html$ ls -ld
drwxrwsr-x 3 root root 4096 ott 2 12:30 .
magento_user@roman-pc:/var/www/html$ mkdir duck
mkdir: cannot create directory ‘duck’: Permission denied
magento_user@roman-pc:/var/www/html$ mkdir duck
mkdir: cannot create directory ‘duck’: Permission denied
为什么我仍然没有rws
:读,写,(s
代表什么?)?