What should be the directory mode for /var/www/html folder

amazon ec2chmodsftp

I am having trouble uploading files to my /var/www/html folder.

This is the current mode:

Permission denied (SSH_FX_PERMISSION_DENIED: The user does not have sufficient permissions to perform the operation.).

I logged in as "user", what mod should I give to the user? I tried 777, then i can upload, but is it secure to let the user and public to read, write and execute??

THis is what it display when i run : ls -l

...
drwxr-xr-x 3 root root 4096 Mar 28 03:58 html
...

Best Answer

Only root has write access to the directory. If you change its owner to "user", you'll get write access with the current permissions.