4 Answers
- Newest
- Most votes
- Most comments
1
Looking at the permissions below, it appears that users other than "www-data" do not have read/write permissions.
drwx--x--x 12 www-data www-data 4096 Apr 21 14:23 html
So try the following command.
chmod 775 -R /var/www/html
0
The default user is Ubuntu, and the permissions cannot be modified. After I switch to the root user, I can modify the permissions.
Now I can open the html folder.
But I can't make any modifications to the file.
Status: Connected to 12.345.67.89
Status: Retrieving directory listing of "/var/www"...
Status: Listing directory /var/www
Status: Directory listing of "/var/www" successful
Status: Retrieving directory listing of "/var/www/html"...
Status: Listing directory /var/www/html
Status: Directory listing of "/var/www/html" successful
Status: Starting upload of F:\Magento\theme\themeforest-TlWf1t1h-minimogmgt-the-high-converting-magento-2-theme\Minimog_Package_1.1.9\Base_Start_Package\minimog_theme\minimog_theme.zip
Status: Retrieving directory listing of "/var/www/html"...
Status: Listing directory /var/www/html
Command: put "F:\Magento\theme\themeforest-TlWf1t1h-minimogmgt-the-high-converting-magento-2-theme\Minimog_Package_1.1.9\Base_Start_Package\minimog_theme\minimog_theme.zip" "minimog_theme.zip"
Error: /var/www/html/minimog_theme.zip: open for write: permission denied
Error: File transfer failed
Status: Retrieving directory listing of "/var/www/html"...
Status: Listing directory /var/www/html
Status: Directory listing of "/var/www/html" successful
Status: Disconnected from server
ubuntu@ip-123-45-6-78:~$ chmod 775 -R /var/www/html
chmod: changing permissions of '/var/www/html': Operation not permitted
chmod: cannot read directory '/var/www/html': Permission denied
ubuntu@ip-123-45-6-78:~$ su root
Password:
root@ip-123-45-6-78:/home/ubuntu# cd /
root@ip-123-45-6-78:/# chmod 775 -R /var/www/html
root@ip-123-45-6-78:/# cd /var/www
root@ip-123-45-6-78:/var/www# ls -al
total 12
drwxr-xr-x 3 root root 4096 Apr 21 07:34 .
drwxr-xr-x 14 root root 4096 Apr 21 07:34 ..
drwxrwxr-x 12 www-data www-data 4096 Apr 21 14:23 html
root@ip-123-45-6-78:/var/www#
answered a year ago
0
My FileZilla is using the ubuntu user. How do I modify the permissions of ubuntu?
root@ip-123-45-6-78:/# whoami
root
root@ip-123-45-6-78:/# su ubuntu
ubuntu@ip-123-45-6-78:/$ whoami
ubuntu
ubuntu@ip-123-45-6-78:/$ cd /var/www/html
ubuntu@ip-123-45-6-78:/var/www/html$ ls -al
total 1892
drwxrwxr-x 12 www-data www-data 4096 Apr 21 14:23 .
drwxr-xr-x 3 root root 4096 Apr 21 07:34 ..
-rwxrwxr-x 1 www-data www-data 343 Apr 21 14:23 .editorconfig
-rwxrwxr-x 1 www-data www-data 214 Apr 21 14:23 .htaccess
-rwxrwxr-x 1 www-data www-data 11382 Apr 21 14:23 .htaccess.sample
-rwxrwxr-x 1 www-data www-data 1523 Apr 21 14:23 .php-cs-fixer.dist.php
-rwxrwxr-x 1 www-data www-data 101 Apr 21 14:23 .user.ini
-rwxrwxr-x 1 www-data www-data 766543 Apr 21 14:23 CHANGELOG.md
-rwxrwxr-x 1 www-data www-data 650 Apr 21 14:23 COPYING.txt
-rwxrwxr-x 1 www-data www-data 2972 Apr 21 14:23 Gruntfile.js.sample
-rwxrwxr-x 1 www-data www-data 10364 Apr 21 14:23 LICENSE.txt
-rwxrwxr-x 1 www-data www-data 10376 Apr 21 14:23 LICENSE_AFL.txt
-rwxrwxr-x 1 www-data www-data 698 Apr 21 14:23 SECURITY.md
drwxrwxr-x 4 www-data www-data 4096 Apr 21 14:23 app
-rwxrwxr-x 1 www-data www-data 150 Apr 21 14:23 auth.json.sample
drwxrwxr-x 2 www-data www-data 4096 Apr 21 14:23 bin
-rwxrwxr-x 1 www-data www-data 2803 Feb 23 14:14 composer.json
-rwxrwxr-x 1 www-data www-data 1025343 Apr 21 14:21 composer.lock
drwxrwxr-x 4 www-data www-data 4096 Apr 21 14:23 dev
drwxrwsr-x 4 www-data www-data 4096 Apr 23 11:47 generated
-rwxrwxr-x 1 www-data www-data 55 Apr 21 14:23 grunt-config.json.sample
drwxrwxr-x 4 www-data www-data 4096 Apr 21 14:23 lib
-rwxrwxr-x 1 www-data www-data 6957 Apr 21 14:23 nginx.conf.sample
-rwxrwxr-x 1 www-data www-data 1234 Apr 21 14:23 package.json.sample
drwxrwxr-x 2 www-data www-data 4096 Apr 21 14:23 phpserver
drwxrwxr-x 6 www-data www-data 4096 Apr 21 15:59 pub
drwxrwxr-x 7 www-data www-data 4096 Apr 21 14:23 setup
drwxrwsr-x 8 www-data www-data 4096 Apr 23 11:54 var
drwxrwsr-x 75 www-data www-data 4096 Apr 21 14:23 vendor
ubuntu@ip-123-45-6-78:/var/www/html$
answered a year ago
0
Riku_Kobayashi, Thank you so much. I am now an ubuntu user, and I can upload files normally using FileZilla.
The following code hopefully helps someone who has the same problem as me.
ubuntu@ip-123-45-6-78:/$ su root
Password:
root@ip-123-45-6-78:/# usermod -aG www-data ubuntu
answered a year ago
Relevant content
- asked a year ago
- asked 2 years ago
- asked 3 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 3 years ago
The default user is Ubuntu, and the permissions cannot be modified. After I switch to the root user, I can modify the permissions.
Now I can open the html folder.
But I can't make any modifications to the file.
Make the Ubuntu user belong to the "www-data" group with the following command. The following commands must be executed as root user.
Thank you so much. I am now an ubuntu user, and I can upload files normally using FileZilla.