Permission denied when uploading or creating file or folder with FTP client (AWS EC2 Litespeed Wordpress instance)

I have installed WordPress with LiteSpeed Cache (Powered OpenLiteSpeed) on AWS EC2 instance. I need to install a font and create "fonts" folder inside theme folder. Unfortunately I always get "permission denied" whenever I try to upload or create a file or a folder with FTP clients (Filezilla or WinSCP)

Error: /var/www/html/wp-content/themes/astra/assets/fonts/Code200365k.ttf: open for write: permission denied
Error: File transfer failed

scp: /var/www/html/wp-content/themes/astra/assets/fonts/Code200365k.ttf: Permission denied

I've searched for solutions at Google and followed this guide but nothing worked need to select,enter 644 in numeric value.


Well-Known Member
Some control panels doesn't allow to change permissions with local FTP application. If so, change permission with control panel file explorer or use console instead . That will work.
Last edited:


Staff member
The default document root folder is owned by www-data:www-data. If you use root, then you should have no permission issue during the upload, but you might need to manually change the whole document root folder with following command:
chown -R www-data:www-data /var/www/html
If you use other users, then you might need to add it to the www-data group.
Thank you Eric & Serpent Driver for your replies.

I tried below 2 commands and receive "chown: changing ownership of '/var/www/html': Operation not permitted"
1) chown -R www-data:www-data /var/www/html
2) chown -R ubuntu /var/www/html

I use "ubuntu" as user (to login to WinSCP and Putty). I add sudo useradd -g www-data ubuntu, but "ubuntu" already exist.

Sorry I am total newbie. I appreciate your help.
Last edited: