I am using VM Player for Ubuntu, then using WinSCP I need to copy the installer of a CMS to /var/www/html but it always says –
Error creating folder
Permission denied.
Error code: 3
Error message from server: Permission denied
Even when I try to create a folder it gives the same error. Thank you! I'm a student adnd this is for project purposes.
Best Answer
That's because
/var
is owned by root, so you have to be temporarily root to access it ..That's exactly what's the sudo command for, for making you look like another user, which is root by default.
The root user happens to have access to everything on the system, whether it belonged to you, root, or whatever ..
So, to create a folder in a folder that isn't yours, you use sudo.
In other words, you have to do the following.
Copy the installer using the command:
(directory would be
/var/www/html
in your case)You're done!